题目出处:http://codeforces.com/contest/1013/problem/A
#include<iostream>
using namespace std;
int main(){
int n,x;
int sum1=,sum2=;
cin>>n;
for(int i=;i<n;i++){
cin>>x;
sum1+=x;
}
for(int i=;i<n;i++){
cin>>x;
sum2+=x;
}
if(sum1<sum2)
cout<<"NO"<<endl;
else
cout<<"YES"<<endl;
return ;
}

题目解析:很长的题目就是说给出n堆石头,再给出两组石头堆的石头数量情况,对第一组有“取走”和“移动”两种操作,次数无限,问能否变成第二组的情况。

1013A.Piles With Stones的更多相关文章

  1. HDU 5973 Game of Taking Stones 威佐夫博弈+大数

    题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=5973 Game of Taking Stones Time Limit: 2000/1000 MS ...

  2. [LeetCode] 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 consists ...

  3. [Swift]LeetCode1000. 合并石头的最低成本 | 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 consists ...

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

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

  5. icpc 2017北京 J题 Pangu and Stones 区间DP

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

  6. 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 consists ...

  7. 【2017 ICPC亚洲区域赛北京站 J】Pangu and Stones(区间dp)

    In Chinese mythology, Pangu is the first living being and the creator of the sky and the earth. He w ...

  8. IEEEXtreme 10.0 - Game of Stones

    这是 meelo 原创的 IEEEXtreme极限编程大赛题解 Xtreme 10.0 - Game of Stones 题目来源 第10届IEEE极限编程大赛 https://www.hackerr ...

  9. hdu 5973 Game of Taking Stones(大数,bash game¥)

    Game of Taking Stones Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Ot ...

随机推荐

  1. Python 内置类型 dict, list,线程安全吗

    近段时间发现一个 Python 连接数据库的连接是线程不安全的,结果惹得我哪哪儿都怀疑变量的多线程是否安全的问题,今天终于找到了正确答案,那就是 Python 内置类型 dict,list ,tupl ...

  2. 本地登录ftp的时候报530错误

    root@instance-iyi104bj:~# ftp localhost Connected to localhost. (vsFTPd ) Name (localhost:root): roo ...

  3. 线程与进程 queue模块

    queue模块的基本用法 https://www.cnblogs.com/chengd/articles/7778506.html 模块实现了3种类型的队列,区别在于队列中条目检索的顺序不同.在FIF ...

  4. 使用IDEA打对应结构的Jar包

    发布环境的内容和自己项目默认打包的样式不一样,就需要自定义打印jar包内容. 1.打开右上角项目结构 2.进行图片相关设置 3.直接进行打包,包会出现在class文件里面.解压软件解压开就是自己想要的 ...

  5. 使用maven构建项目的注意事项

    一.如果修改了pom.xml文件,就有点类似修改了项目的结构,在再次运行项目前,应该Mvaen >>Update project一下. 二.对于依赖一个系列的的包,如spring,我们应该 ...

  6. 实验吧web-易-上传绕过

    随便上传一个png文件,出现提示 我们再上传一个php文件,却出现提示 上传遇到问题是肯定的,题目就是上传绕过,所以我们下面要做的就是绕过检测. 这里使用00截断. 首先在提交时抓包 我们将图中upl ...

  7. zuul网关配置

    静态路由:通过url匹配映射地址进行静态路由(只会把到达zuul网关的请求按照发送,并把匹配请求地址 /common-service/ ->http://localhost:9001/) zuu ...

  8. <style scoped >中使用深度选择器影响子组件

    摘自:https://blog.csdn.net/zhouzuoluo/article/details/95593143 <style scoped >中使用深度选择器影响子组件 在< ...

  9. find_element_by_xpath()的6种方法

    Xpath (XML Path Language),是W3C定义的用来在XML文档中选择节点的语言 一:从根目录/开始 有点像Linux的文件查看,/代表根目录,一级一级的查找,直接子节点,相当于cs ...

  10. 备份 分区表 mbr

    备份方法:   1.备份分区表信息 sudo fdisk -l >hda.txt  #分区表信息重定向输出到文件中 2.备份MBR linux@linux-desktop:~/ex$ sudo ...