poj1663---纯粹找规律】的更多相关文章

#include <stdio.h> #include <stdlib.h> int main() { int n; scanf("%d",&n); while(n--) { int x,y; scanf("%d %d",&x,&y); ==) { if(y==x) printf("%d\n",x+y); )) { printf("%d\n",x+y); } else print…
题目链接:http://acm.swust.edu.cn/problem/0666/ Time limit(ms): 1000 Memory limit(kb): 65535   Description 小李去埃及旅游,但是初来乍到的他不认识罗马数,所以请你将阿拉伯数n ( 0 < n <= 1000)改写为罗马数.   Input N行数据,每行一个满足0 < n <= 1000的数: 结束以EOF判断   Output 每行一个,见输出示例   Sample Input 1 1…
- Eddy's research II Time Limit:2000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64u Submit Status Description As is known, Ackermann function plays an important role in the sphere of theoretical computer science. However, in the other h…
Zball in Tina Town  Accepts: 541  Submissions: 2463  Time Limit: 3000/1500 MS (Java/Others)  Memory Limit: 262144/262144 K (Java/Others) 问题描写叙述 Tina Town 是一个善良友好的地方,这里的每个人都互相关心. Tina有一个球,它的名字叫zball.zball非常奇妙,它会每天变大.在第一天的时候,它会变大11倍. 在第二天的时候,它会变大22倍.在第…
这道题是有规律的博弈题目,,, 所以我们只需要找出规律来就ok了 牛人用sg函数暴力找规律,菜鸟手工模拟以求规律...[牢骚] if(m>=2) { if(n<=m) {first第一口就可以吃掉所有的.所以first必赢,} else {first无法一口吃掉所有的,所以second成了主动的了,如果first第一口吃掉k1个,那么明智的second只要吃掉k2个就可以了(n-k1-k2是偶数,也包括 0的),使得 剩下的数字是分成两个数字数目相等的堆,以后的工作便是first做什么,那么s…
已知有n个单位的水,问有几种方式把这些水喝完,每天至少喝1个单位的水,而且每天喝的水的单位为整数.看上去挺复杂要跑循环,但其实上,列举几种情况之后就会发现是找规律的题了= =都是2的n-1次方,而且这题输出二进制数就行了......那就更简单了,直接输出1,然后后面跟n-1个0就行了╮(╯_╰)╭ 下面AC代码 #include<iostream> #include<cstdio> #include<cstring> #include<algorithm>…
2014多校 第八题 1008 2014 Multi-University Training Contest 8 4952 Number Transformation Number Transformation Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 85 Accepted Submission(s): 31 Problem Descr…
http://codeforces.com/contest/456/problem/B CF#260 div2 B Fedya and Maths Codeforces Round #260 B. Fedya and Maths time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Fedya studies in a gymnasi…
题意:找字串中最长回文串的最小值的串 m=2的时候暴力打表找规律,打表可以用二进制枚举…
题目传送门 /* 水题 找规律输出 */ #include <cstdio> #include <iostream> #include <cstring> #include <string> #include <map> #include <algorithm> #include <vector> #include <set> #include <cmath> using namespace std…