省赛适应赛
Hzy_hzy_hzy
世间万物生生衍息······ 你找到生命的存在了吗?
展开
-
CodeForces 628B New Skateboard
Description Max wants to buy a new skateboard. He has calculated the amount of money that is needed to buy a new skateboard. He left a calculator on the floor and went to ask some money from hi原创 2016-07-11 21:38:01 · 256 阅读 · 0 评论 -
cf 653B Bear and Compressing
Limak is a little polar bear. Polar bears hate long strings and thus they like to compress them. You should also know that Limak is so young that he knows only first six letters of the English alphabe原创 2016-07-09 15:00:05 · 428 阅读 · 0 评论 -
CodeForces 526B Om Nom and Dark Park
//一个节点下的两条路要放等数量的灯明白这点可用递推的方法写 #include #include using namespace std; int a[5000]; int main(){ int n; scanf("%d",&n); n=(2<<n)-1; for(int i=2;i<=n;i++) //i==2开始 树的一维储存法 cin>>a[i]原创 2016-07-13 09:34:10 · 414 阅读 · 0 评论 -
CodeForces 570B Simple Game
#include//要想概率大就挨着放 int main(){ int n,m,ans; scanf("%d%d",&n,&m); if(n==1) {ans=1;printf("1\n");return 0;} if(n%2==0){ if(m<=n/2) ans=m+1; else ans=m-1; } e原创 2016-07-13 09:48:41 · 325 阅读 · 0 评论 -
CodeForces 546D Soldier and Number Game
//题意是求能n!/m!的值分解质因数有多少个素数可对m->n每个数分解质因数再求和 //递推:dp[i]=dp[i/prime[j]]+1 #include #include #include using namespace std; const int N=5000005; int isprime[N]; int prime[N]; int dp[N]; int top; void init(原创 2016-07-13 09:45:46 · 322 阅读 · 0 评论 -
CodeForces 607A Chain Reaction
//题意是有一系列塔,每个塔位置不同攻击范围不同,塔只攻击右侧,范围内的(包括边界塔不包括本身);按从右到左的顺序点燃,被破坏掉的将不能点燃;要求:在最右侧再添一个塔并第一个点燃,使破坏掉的塔的数目最少 //涉及递推,2ms时限,优化3次ac !!不考虑新加的塔《给出一系列塔的位置和破坏范围,(ps:自己把它当成一个串觉的好理解)可求出这一系列(这个串)当点燃时破环的塔数》。原创 2016-07-13 11:09:36 · 274 阅读 · 0 评论 -
题目链接...
点击打开链接密码:nyist原创 2016-07-13 22:23:31 · 257 阅读 · 0 评论 -
CodeForces 567C Geometric Progression
Polycarp loves geometric progressions very much. Since he was only three years old, he loves only the progressions of length three. He also has a favorite integer k and a sequence a, consisting of n原创 2016-07-13 15:14:09 · 463 阅读 · 0 评论