
水题
文章平均质量分 59
akxxsb
写写博客装装逼,存代码
展开
-
hdu 2044 (水题)
简单递推,还是wa了很多次没过,原来hdu的long long要用%I64d才能过。。。不明白,不是只比对输出的吗。。。。#define Max 55#includeint M;char s[Max];int a,b;long long c[Max];int main(){ //freopen("input.txt","r",stdin); scanf("%d\n"原创 2014-02-22 01:34:57 · 988 阅读 · 0 评论 -
ZOJ 3715 Kindergarten Election(枚举+贪心)
Kindergarten ElectionTime Limit: 2 Seconds Memory Limit: 65536 KBAt the beginning of the semester in kindergarten, the n little kids (indexed from 1 to n, for convenience) in class need原创 2014-12-19 18:28:25 · 1636 阅读 · 0 评论 -
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 · 1625 阅读 · 0 评论 -
poj 2021 优先队列bfs
Relative RelativesTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 3438 Accepted: 1507DescriptionToday is Ted's 100th birthday. A few weeks ago, you were原创 2014-05-19 20:58:04 · 1023 阅读 · 0 评论 -
UVA 123 Searching Quickly
题意:给出一系列要忽略的单词,这些单词以外的单词都看作关键字。然后给出一些标题,找出标题中所有的关键字,然后按这些关键字的字典序给标题排序。注意两点:相同关键字出现在不同标题中,出现在输入较前位置的标题排在前面(从样例数据可以看出,而且multimap也正是这么做的);同一个关键字在一个标题中出现多次,关键字位于较前位置的排在前面(从左向右扫描的话就没有问题)。#include#i原创 2014-04-27 00:22:01 · 3050 阅读 · 0 评论 -
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 · 1174 阅读 · 0 评论 -
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 · 1466 阅读 · 0 评论 -
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 · 1591 阅读 · 0 评论 -
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 · 1346 阅读 · 0 评论 -
乱水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 · 1255 阅读 · 0 评论 -
哈理工校赛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 · 1318 阅读 · 0 评论 -
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 · 1603 阅读 · 0 评论 -
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 · 883 阅读 · 0 评论 -
hdu 2047
不废话,直接代码#define Max 55#include#include#includeint n;long long c[Max],k[Max],m[Max];//c,k,m分别为长度为n时方法数和非o的字符个数和字符o的个数void ans(){ k[1]=2;m[1]=1;c[1]=3; for(int i=2;i<=50;i++) {原创 2014-02-24 11:18:46 · 1057 阅读 · 0 评论 -
微软苏州校招笔试 12月27日
题目1 : Lost in the City时间限制:10000ms单点时限:1000ms内存限制:256MB描述Little Hi gets lost in the city. He does not know where he is. He does not know which direction is north.Fortun原创 2014-12-27 22:45:33 · 3481 阅读 · 8 评论