题目出处: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. 【剑指Offer】面试题22. 链表中倒数第k个节点

    题目 输入一个链表,输出该链表中倒数第k个节点.为了符合大多数人的习惯,本题从1开始计数,即链表的尾节点是倒数第1个节点.例如,一个链表有6个节点,从头节点开始,它们的值依次是1.2.3.4.5.6. ...

  2. PL/SQL表结构/数据的导出

    1.表结构导出 方法一:在sql页面点击表名,进入表编辑页面,点击右下角“查看SQL”按钮,即可看到表结构 方法二:工具--导出用户对象 去掉所有者勾选项,即***.表名:用户名字在其他用户导入数据库 ...

  3. 外部 Storage Provider【转】

    如果 Kubernetes 部署在诸如 AWS.GCE.Azure 等公有云上,可以直接使用云硬盘作为 Volume,下面是 AWS Elastic Block Store 的例子: 要在 Pod 中 ...

  4. #define、#undef、#ifdef、#ifndef、#if、#elif、#else、#endif、defined解释

    #define.#undef.#ifdef.#ifndef.#if.#elif.#else.#endif.defined. #define            定义一个预处理宏#undef     ...

  5. JVM源码分析之自定义类加载器如何拉长YGC

    概述 本文重点讲述毕玄大师在其公众号上发的一个GC问题一个jstack/jmap等不能用的case,对于毕大师那篇文章,题目上没有提到GC的那个问题,不过进入到文章里可以看到,既然文章提到了jstac ...

  6. Vulkan 开发学习资料汇总

    开发资料汇总 1.API Reference 2.Vulkan Spec 有详细说明的pdf 文章 1.知乎Vulkan-高性能渲染 2.Life of a triangle - NVIDIA's l ...

  7. Sqlserver 增删改查----删

    --我们就以院系,班级,学生来举例. create TABLE [dbo].YuanXi ( Id ,) NOT NULL,--学校id 自增量 YuanXiName varchar() null, ...

  8. Java中String类为什么被设计为final?

    Java中String类为什么被设计为final   首先,String是引用类型,也就是每个字符串都是一个String实例.通过源码可以看到String底层维护了一个byte数组:private f ...

  9. MFC 打开Jpg文件

    UpdateWindow(); int height, width; CRect rect;//定义矩形类 CRect rect1; CImage image; //创建图片类 image.Load( ...

  10. [前端] VUE基础 (9) (element-ui、axios、Vuex)

    一.element-ui的使用 官方网页:https://element.eleme.cn/#/zh-CN 1.安装element-ui (venv) D:\pycharm_workspace\vue ...