摘要:
http://codeforces.com/problemset/problem/556/B题意:给定n个数字且都小于n,然后每次循环第2k+1个数字+1,第2k个数字减一,k=0,1,2...n/2. 问最后能不能使n个数字刚好为排列为0,1,2,....n-1.题解:简单模拟就好了,循环次数设为... 阅读全文
摘要:
http://codeforces.com/problemset/problem/556/A题意:给一个01字符串,把所有相邻的0和1去掉,问还剩下几个0和1。题解:统计所有的0有多少个,1有多少个,最后答案就是两者不同的个数。#include #include #include #include ... 阅读全文
摘要:
BiliBili, ACFun… And More!Time Limit: 3000/1000MS (Java/Others) Memory Limit: 65535/65535KB (Java/Others)Some of you may have already noticed, there ... 阅读全文