Codeforces Round #500 (Div. 2)
题目链接:Piles With Stones

大致题意就是有n堆石头,第一天每堆有一定数目的石头,第二天石头可能被小朋友移动或者带走,求满足题意的两天的石碓;
所以第二天的石头总数不会大于第一天的,所以是sum1-sum2>=0即可。
//又只打了一道题,扣了80多分。。。

#include<bits/stdc++.h>
using namespace std;int x[55],y[55],n,s1=0,s2=0;int main(){scanf("%d",&n);for(int i=0;i<n;i++){scanf("%d",&x[i]);s1+=x[i];}for(int i=0;i<n;i++){scanf("%d",&y[i]);s2+=y[i];}if((s1-s2)>=0)printf("Yes\n");else printf("No\n");return 0;
}

Piles-with-stones相关推荐

  1. [ICPC 北京 2017 J题]HihoCoder 1636 Pangu and Stones

    #1636 : Pangu and Stones 时间限制:1000ms 单点时限:1000ms 内存限制:256MB 描述 In Chinese mythology, Pangu is the fi ...

  2. Moving stones(暴力+思维)

    链接:https://ac.nowcoder.com/acm/contest/5891/D 来源:牛客网 题目描述 One day, GK was getting very bored with pa ...

  3. codeforce 227D Naughty Stone Piles (贪心+递归+递推)

    Description There are n piles of stones of sizes a1, a2, -, an lying on the table in front of you. D ...

  4. *【2019牛客暑期多校训练营(第三场)- G】Removing Stones(分治)

    题干: 链接:https://ac.nowcoder.com/acm/contest/883/G 来源:牛客网 Summer vacation is coming and Mark has retur ...

  5. Naughty Stone Piles(CF-226B)

    Problem Description There are n piles of stones of sizes a1, a2, ..., an lying on the table in front ...

  6. 2017ICPC北京 J:Pangu and Stones(区间DP)

    #1636 : Pangu and Stones 时间限制:1000ms 单点时限:1000ms 内存限制:256MB 描述 In Chinese mythology, Pangu is the fi ...

  7. hihocoder1636-Pangu and Stones

    #1636 : Pangu and Stones 时间限制:1000ms 单点时限:1000ms 内存限制:256MB 描述 In Chinese mythology, Pangu is the fi ...

  8. Pangu and Stones 解题报告

    题目: 描述 In Chinese mythology, Pangu is the first living being and the creator of the sky and the eart ...

  9. 【LeetCode 1000】 Minimum Cost to Merge Stones

    题目描述 There are N piles of stones arranged in a row. The i-th pile has stones[i] stones. A move consi ...

  10. Quantity Of The Stones

    Quantity Of The Stones Time Limit : 3000/1000ms (Java/Other)   Memory Limit : 65535/32768K (Java/Oth ...

最新文章

  1. R卡方检验(CHI-SQUARE TEST)
  2. c语言基本类型学习小结
  3. matlab高中必修三数学模拟,基于MATLAB的模拟调制实验报告
  4. golang 导入自定义包_goLang引入自定义包的方法
  5. Jenkins的一些代码
  6. 黑苹果睡眠唤醒usb失灵_20191121关于睡眠唤醒,仍然黑屏,显示器无信号的问题...
  7. Rest接口中正则表达式
  8. 计算机网线接口松动怎么办,家里宽带“罢工”怎么办?中国移动教你五步排障法...
  9. 网络编程之POP3协议邮箱收信
  10. 整数拼接(记忆化更新)
  11. 将MATLAB任务栏变成白色的图标恢复
  12. HR_NZ_ROUNDING_DECIMALS DUMP
  13. 在Android面试前背八股和学面试技巧真的有用吗?
  14. Android之ubuntu源码开发环境搭建笔记
  15. 【某集训题解】【DAY 2 T3】与非
  16. 2022社区交友系统源码+支持在线聊天/直播+有搭建教程
  17. ajax:php数组数据类型
  18. python多线程爬取海报图片
  19. 有哪些手游的账号卖了值钱?
  20. 一日之计在于晨,晨跑带来的不止是健康,还有乐观积极的人生态度

热门文章

  1. Dragon Mainland(龙大陆)深度攻略
  2. 【从零开始学习 SystemVerilog】3.1.4、SystemVerilog 控制流—— forever 循环
  3. Node.js学习之路--npm包管理工具操作汇总
  4. Python 装饰器解析
  5. VScode配置LaTeX
  6. TPM零知识学习五 —— tpm2-abrmd源码安装
  7. Hive 元数据表结构详解
  8. PostgreSQL之函数和操作符
  9. 现代ups电源及电路图集_现代UPS电源及电路图集
  10. Elasticsearch Search API