Piles-with-stones
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相关推荐
- [ICPC 北京 2017 J题]HihoCoder 1636 Pangu and Stones
#1636 : Pangu and Stones 时间限制:1000ms 单点时限:1000ms 内存限制:256MB 描述 In Chinese mythology, Pangu is the fi ...
- Moving stones(暴力+思维)
链接:https://ac.nowcoder.com/acm/contest/5891/D 来源:牛客网 题目描述 One day, GK was getting very bored with pa ...
- 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 ...
- *【2019牛客暑期多校训练营(第三场)- G】Removing Stones(分治)
题干: 链接:https://ac.nowcoder.com/acm/contest/883/G 来源:牛客网 Summer vacation is coming and Mark has retur ...
- Naughty Stone Piles(CF-226B)
Problem Description There are n piles of stones of sizes a1, a2, ..., an lying on the table in front ...
- 2017ICPC北京 J:Pangu and Stones(区间DP)
#1636 : Pangu and Stones 时间限制:1000ms 单点时限:1000ms 内存限制:256MB 描述 In Chinese mythology, Pangu is the fi ...
- hihocoder1636-Pangu and Stones
#1636 : Pangu and Stones 时间限制:1000ms 单点时限:1000ms 内存限制:256MB 描述 In Chinese mythology, Pangu is the fi ...
- Pangu and Stones 解题报告
题目: 描述 In Chinese mythology, Pangu is the first living being and the creator of the sky and the eart ...
- 【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 ...
- Quantity Of The Stones
Quantity Of The Stones Time Limit : 3000/1000ms (Java/Other) Memory Limit : 65535/32768K (Java/Oth ...
最新文章
- R卡方检验(CHI-SQUARE TEST)
- c语言基本类型学习小结
- matlab高中必修三数学模拟,基于MATLAB的模拟调制实验报告
- golang 导入自定义包_goLang引入自定义包的方法
- Jenkins的一些代码
- 黑苹果睡眠唤醒usb失灵_20191121关于睡眠唤醒,仍然黑屏,显示器无信号的问题...
- Rest接口中正则表达式
- 计算机网线接口松动怎么办,家里宽带“罢工”怎么办?中国移动教你五步排障法...
- 网络编程之POP3协议邮箱收信
- 整数拼接(记忆化更新)
- 将MATLAB任务栏变成白色的图标恢复
- HR_NZ_ROUNDING_DECIMALS DUMP
- 在Android面试前背八股和学面试技巧真的有用吗?
- Android之ubuntu源码开发环境搭建笔记
- 【某集训题解】【DAY 2 T3】与非
- 2022社区交友系统源码+支持在线聊天/直播+有搭建教程
- ajax:php数组数据类型
- python多线程爬取海报图片
- 有哪些手游的账号卖了值钱?
- 一日之计在于晨,晨跑带来的不止是健康,还有乐观积极的人生态度