Pagodas Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 70    Accepted Submission(s): 62 Problem Description n pagodas were standing erect in Hong Jue Si between the Niushou Mountain and the Yun…
Bazinga Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 214    Accepted Submission(s): 89 Problem Description Ladies and gentlemen, please sit up straight.Don't tilt your head. I'm serious.For n…
题意:找字串中最长回文串的最小值的串 m=2的时候暴力打表找规律,打表可以用二进制枚举…
Rebuild Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 521    Accepted Submission(s): 125 Problem Description Archaeologists find ruins of Ancient ACM Civilization, and they want to rebuild i…
#include<stdio.h> #include<string.h> #include<iostream> #include<math.h> #include<stdlib.h> #include<algorithm> using namespace std; #define N 500000 #define mod 1000000007 __int64 a[N], b[N], ans[N]; void Init() { int…
题目链接 题意:开始有a,b两点,之后可以按照a-b,a+b的方法生成[1,n]中没有的点,Yuwgna 为先手, Iaka后手.最后不能再生成点的一方输: (1 <= n <= 20000) T组数据T <= 500; 思路:由扩展欧几里得知道对于任意正整数,一定存在整数x,y使得 x*a + y*b = gcd(a,b);并且这个gcd是a,b组成的最小正整数:同时也知道了这也是两个点之间的最小距离: 之后直接求点的个数即可: ps:这道题我竟然想到了组合游戏..明显没有说双方都要用…
2015 ACM / ICPC 沈阳现场赛 D 题 找了一小时规律......发现是个GCD. #include<cstdio> #include<cstring> #include<cmath> #include<queue> #include<algorithm> using namespace std; int n,a,b; int gcd(int a,int b) { int t; while(b) t = a%b,a = b,b = t…
Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 11740    Accepted Submission(s): 7620 Problem Description 大学英语四级考试就要来临了,你是不是在紧张的复习?也许紧张得连短学期的ACM都没工夫练习了,反正我知道的Kiki和Cici都是如此.当然,作为在考场浸润了十几载的当代大学生,K…
题意:两个玩家玩一个游戏,从 p = 1,开始,然后依次轮流选择一个2 - 9的数乘以 p,问你谁先凑够 p >= n. 析:找规律,我先打了一下SG函数的表,然后就找到规律了 我找到的是: 1 - 9                                 Stan wins.                         1  ~  9 10 - 18                             Ollie wins.                         …
Coach Pang and Uncle Yang both love numbers. Every morning they play a game with number together. In each game the following will be done:  1. Coach Pang randomly choose a integer x in [a, b] with equal probability.  2. Uncle Yang randomly choose a i…