- 博客(22)
- 收藏
- 关注
原创 HDU 2095
好吧,这题我开始先排序超时了,后来用了异或,再次见识到位运算的强大。。。 我们知道A^A=0A^0=A所以只要把输入的数字全部异或 那么留下来的就是奇数个的数字。find your present (2)Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/1024 K (Ja
2014-03-31 22:19:43 1101
原创 1408: The Game(博弈论)尼姆博弈
1408: The Game时间限制: 1 Sec 内存限制: 256 MB提交: 54 解决: 25[提交][状态][讨论版]题目描述John and his brother are playing a game. There are several piles of stones. At first John has to pick up some ston
2014-03-30 22:00:01 1140
原创 NEUOJ 1403: XL's Math Problem II
题目如图所示,由于n很大直接枚举肯定不行,所以以此枚举商x,把最左边的i和最右边的j使得满足n/i=x,n/j=x,的i,和j求出来,j-i+1就是商x的个数。#include#include#includeusing namespace std;typedef long long LL;int main(){ int n,cas,L,R,cnt=0; LL ans
2014-03-30 21:52:04 1137
原创 LIGHTOJ 1027
应该是概率的题,还有最大公约数约分的问题。E - LIGHTOJ 1027Time Limit:2000MS Memory Limit:32768KB 64bit IO Format:%lld & %lluSubmit StatusDescriptionYou are in a maze; seeing n doors in fr
2014-03-26 20:10:39 1204
原创 LIGHTOJ 1005
A - LIGHTOJ 1005Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%lld & %lluSubmit StatusDescriptionA rook is a piece used in the game of chess which is played on a board
2014-03-26 19:19:40 1135
原创 UVA 10474 - Where is the Marble?
#include #include #include #define max 10001int a[max],b[max];void search(int num,int N){ int low=1,high=N,mid; int ok=0; mid=(low+high)/2; while(low<high) { if(a[mid
2014-03-26 00:49:13 1442
原创 UVA 10420 - List of Conquests
本题注意要查找一下输入的人的国家是否已经出现Problem BList of ConquestsInput: standard inputOutput: standard outputTime Limit: 2 secondsIn Act I, Leporello is telling Donna Elvira about his master's long list
2014-03-24 00:33:55 1541
原创 UVA 10115 Automatic Editing
字符串处理题,需要注意的是要一直替换到没有所给的字符串为止,所以可以在change函数里返回1(代表查找成功)和0(代表没有要替换的字符了)Problem E: Automatic EditingSource file:autoedit.{c, cpp, java, pas}Input file:autoedit.inOutput fil
2014-03-23 23:56:22 1306
原创 Codeforces Round #238 (Div. 2) B题
字符串处理题B. Domino Effecttime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputLittle Chris knows there's no f
2014-03-23 01:08:25 1754
原创 Codeforces Round #238 (Div. 2) A题
A. Gravity Fliptime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output大水题,直接排序输出Little Chris is bored during h
2014-03-23 01:07:31 1559
原创 Codeforces Round #236 (Div. 2)A
A. Nutstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou have a nuts and lots of boxes. The boxes have a
2014-03-17 01:44:27 1581
原创 Codeforces Round #236 (Div. 2)B
本题枚举第一课树的高度即可B. Trees in a Rowtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe Queen of England has n
2014-03-17 01:40:19 1590
原创 乱水2
C. 座位编号Time Limit: 1000msCase Time Limit: 1000msMemory Limit: 65536KB64-bit integer IO format: %lld Java class name: MainSubmit StatusFont Size: + -第十届北京师范大学
2014-03-16 17:28:55 1229
原创 乱水bnuoj
Current Server Time: 2014-03-16 15:41:22A B C D E F G H IB. Alkane or Alkene??Time Limit: 1000msCase Time Limit: 1000msMemory Limit: 65536KB64-bit integer IO format: %lld
2014-03-16 16:43:22 1308
原创 第八届湘潭大学程序设计比赛A题
A Love LetterAccepted : 33 Submit : 66Time Limit : 1000 MS Memory Limit : 65536 KB 题目描述 CodeMonkey终于下定决心用情书的方式向心爱的女神表白,当他历经几天几夜写完之后才知道女神有很多不喜欢的词,所以他不得不有把
2014-03-15 20:07:22 1660
原创 湘潭大学第八届程序设计竞赛B题
本题要注意测试数据相当的多啊,所以要先构造出所有解并排序,然后用二分查找即可Bob's ProblemAccepted : 29 Submit : 193Time Limit : 1000 MS Memory Limit : 65536 KB 题目描述Bob今天碰到一个问题,他想
2014-03-15 19:44:23 1361
原创 Mincost
http://t.cn/zjBp4jd FAQ http://t.cn/zjHKbmN Linux问题看http://t.cn/aWnP1n1031: Mincost时间限制: 1 Sec 内存限制: 128 MB提交: 303 解决: 88[提交][状态][讨论版]题目描述The cost of taking a taxi in Hangzho
2014-03-13 21:26:35 1680
原创 哈理工校赛1C题
C.长长长长龙Time Limit: 3000 MSMemory Limit: 32768 KTotal Submit: 202 (73 users)Total Accepted: 50 (46 users)Special Judge: NoDescription时间:今天是
2014-03-09 23:33:24 1281
原创 hdu 2058(水)
#include#define MAX 1000010int N,M;int ans1[MAX],ans2[MAX];int main(){ //freopen("input.txt","r",stdin); while(scanf("%d%d",&N,&M)!=EOF) { if(!M&&!N)return 0; int t=-1; for(i
2014-03-05 22:48:43 861
原创 UVA 748(求幂)
需要注意对小数点的处理#include#include#include#include#define MAX 600#define LL strlenvoid jia(const char *str1,char *str)//add str1 to str{ int len1=LL(str1); int c=0;len1--; for(int i=MAX
2014-03-04 17:32:35 1132
原创 uva 465
要说的都在注释里#include#include#define MAX 10010#define LL strlenchar INT_MAX[15]="2147483648";int judge(char *str){ int len=LL(str),ok=LL(INT_MAX); if(len<ok)return 0; if(len==ok&&strcmp(INT_
2014-03-02 19:35:15 1147
原创 UVA 10106高精度乘法
#include#define Max 300#includechar str1[Max],str2[Max];int s[2*Max],c[2*Max];void jia(int *a,int n){ int c=0,ans=0; for(int i=0;i<=n;i++) { s[ans]+=a[i]+c; c=s[ans]/10
2014-03-01 10:46:22 876
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人