上一页 1 ··· 4 5 6 7 8 9 10 11 下一页
摘要: 贪心算法的模拟题。时间限制10 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者ZHANG, GuochuanWith highways available, driving a car from Hangzhou to any other city is easy. But since the tank capacity of a car is limited,... 阅读全文
posted @ 2015-12-06 10:40 白夜行zz 阅读(174) 评论(0) 推荐(0)
摘要: 注意这里n是电话数,电话数不超过1000代表人数不超过两千,。。。好坑。。。。时间限制100 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueOne way that the police finds the head of a gang is to check people's phone calls. If there is a phone ... 阅读全文
posted @ 2015-12-06 10:40 白夜行zz 阅读(141) 评论(0) 推荐(0)
摘要: 时间限制100 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueTo store English words, one method is to use linked lists and store a word letter by letter. To save some space, we may let the words share th... 阅读全文
posted @ 2015-12-06 10:37 白夜行zz 阅读(139) 评论(0) 推荐(0)
摘要: 时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueGiven any string of N (>=5) characters, you are asked to form the characters into the shape of U. For example, "helloworld" can be printed as:... 阅读全文
posted @ 2015-12-06 10:36 白夜行zz 阅读(151) 评论(0) 推荐(0)
摘要: 1,注意algorithm 里面有merge函数2,scanf 比cin快许多,大约是后者1/33,输入long int 用scanf("%ld", &a[i]); 是小写的l时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueGiven an increasing sequence S of N integers, the med... 阅读全文
posted @ 2015-12-06 10:35 白夜行zz 阅读(167) 评论(0) 推荐(1)
摘要: dfs使用vector保存最短路径时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueA traveler's map gives the distances between cities along the highways, together with the cost of each highway. Now you are s... 阅读全文
posted @ 2015-12-06 10:35 白夜行zz 阅读(233) 评论(0) 推荐(0)
摘要: printf 比cout 执行要快时间限制200 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueExcel can sort records according to any column. Now you are supposed to imitate this function.InputEach input file contains o... 阅读全文
posted @ 2015-12-06 10:34 白夜行zz 阅读(133) 评论(0) 推荐(0)
摘要: People in Mars represent the colors in their computers in a similar way as the Earth people. That is, a color is represented by a 6-digit number, where the first 2 digits are for Red, the middle 2 dig... 阅读全文
posted @ 2015-12-06 10:33 白夜行zz 阅读(133) 评论(0) 推荐(0)
摘要: 注意数据合法性的检测。26分的时候 有人打了两个多小时,只能打两个小时,有人9点之后来的,要排除。时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueA table tennis club has N tables available to the public. The tables are numbered from 1 to ... 阅读全文
posted @ 2015-12-06 10:30 白夜行zz 阅读(400) 评论(0) 推荐(0)
摘要: 尽量避免二次循环,很容易运行超时。该算法用printf 用时30ms 使用cout 运行75ms,只差这一句话。所以输出很多的时候不应该使用coutg++ 编译器使用 strcmp 一定要引用 string.h 头Programming Ability Test (PAT) is organized by the College of Computer Science and Technology... 阅读全文
posted @ 2015-12-06 10:29 白夜行zz 阅读(193) 评论(0) 推荐(0)
上一页 1 ··· 4 5 6 7 8 9 10 11 下一页