- 博客(11)
- 收藏
- 关注
原创 296A - Yaroslav and Permutations
题源:点击打开链接分析:有 n 个数组成的数组,可对数组中相邻的元素进行交换值,问是否能使给定的数组交换后相邻元素互不相等。可以输出YES ,反之 NO。#include #define ll long long ;int main() { int n; scanf("%d",&n); int a,b[1000];
2017-08-20 22:34:24 194
原创 810A. Straight «A»
题源:点击打开链接给定一个数列,和一个数 k ,数列的值为 1~k 。要求添加 n 项,使得数列的平均值为 k ,(四舍五入)。问 n 的最小值。暴力破解。。#include int main() { int n,k,sum=0,res; scanf("%d %d",&n,&k); int a[n];
2017-08-20 07:38:03 253
原创 92A. Chips
题目—92A题意分析:有 n 只海象,按 1~n 顺时针编号排序,围成一个圈。有 m 个薯片,从 1 号开始,按顺时针发放,发给当前海象的薯片数量与它的编号一致。如果,当前剩余薯片数量不足以发放给当前海象,则停止发放。问最后剩余的薯片数量。#include int main() { int n,m,res=0; scanf("%d %d"
2017-08-20 01:17:14 237
原创 258A. Little Elephant and Bits
题源:CodeForces#258A分析:输入一个长度为1~105,取值范围为 1 ~10^5 的二进制数,删掉其中一位,使剩余组成的新二进制数最大,输出最大的新二进制数。如果原二进制数有0,则删除第一个0即可,如果全为1,则删除一个1即可。#include using namespace std;int main() { string str;
2017-08-19 23:10:20 209
原创 714A. Meeting of Old Friends
A. Meeting of Old Friendstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputToday an outstanding event is going to happe
2017-08-19 12:02:37 233
原创 429B. Godsend
B. Godsendtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLeha somehow found an array consisting of n integers. Lo
2017-08-19 09:23:08 375
原创 429A. Generous Kefa
A. Generous Kefatime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputOne day Kefa found n baloons. For convenience, we de
2017-08-19 09:04:53 339
原创 447B. DZY Loves Strings
B. DZY Loves Stringstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputDZY loves collecting special strings which only conta
2017-08-18 19:26:36 260
原创 233A. Perfect Permutation
A. Perfect Permutationtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputA permutation is a sequence of integersp1,
2017-08-18 18:52:58 341
原创 268B. Buttons
B. Buttonstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputManao is trying to open a rather challenging lock. The lock
2017-08-18 07:24:43 223
原创 527A. Playing with Paper
A. Playing with Papertime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard output One day Vasya was sitting on a not so
2017-08-18 05:28:41 209
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人