导航

2013年7月17日

摘要: 点击打开链接The SuspectsTime Limit:1000MSMemory Limit:20000KTotal Submissions:18348Accepted:8867DescriptionSevere acute respiratory syndrome (SARS), an atypical pneumonia of unknown aetiology, was recognized as a global threat in mid-March 2003. To minimize transmission to others, the best strategy is to 阅读全文

posted @ 2013-07-17 20:26 勇敢的炮灰 阅读(122) 评论(0) 推荐(0)

摘要: 点击打开链接街区最短路径问题时间限制:3000ms | 内存限制:65535KB难度:4描述一个街区有很多住户,街区的街道只能为东西、南北两种方向。住户只可以沿着街道行走。各个街道之间的间隔相等。用(x,y)来表示住户坐在的街区。例如(4,20),表示用户在东西方向第4个街道,南北方向第20个街道。现在要建一个邮局,使得各个住户到邮局的距离之和最少。求现在这个邮局应该建在那个地方使得所有住户距离之和最小;输入第一行一个整数n#includeint comp(const void *a, const void *b){ return *(int *)a- *(int*)b;}int posx[1 阅读全文

posted @ 2013-07-17 19:06 勇敢的炮灰 阅读(151) 评论(0) 推荐(0)

摘要: 点击打开链接喷水装置(一)时间限制:3000ms | 内存限制:65535KB难度:3描述现有一块草坪,长为20米,宽为2米,要在横中心线上放置半径为Ri的喷水装置,每个喷水装置的效果都会让以它为中心的半径为实数Ri(0#include#includeint camp(const void * a ,const void * b){ return *(int *)b - *(int *)a;}int main(){ int i , j , k , l; double sum; scanf("%d" ,&i); float array[600]; while(i--) 阅读全文

posted @ 2013-07-17 18:53 勇敢的炮灰 阅读(142) 评论(0) 推荐(0)

摘要: 题目链接Binary String Matching时间限制:3000ms | 内存限制:65535KB难度:3描述Given two strings A and B, whose alphabet consist only ‘0’ and ‘1’. Your task is only to tell how many times does A appear as a substring of B? For example, the text string B is ‘1001110110’ while the pattern string A is ‘11’, you should outp 阅读全文

posted @ 2013-07-17 18:39 勇敢的炮灰 阅读(83) 评论(0) 推荐(0)

摘要: ASCII码排序时间限制:3000ms | 内存限制:65535KB难度:2描述输入三个字符(可以重复)后,按各字符的ASCII码从小到大的顺序输出这三个字符。输入第一行输入一个数N,表示有N组测试数据。后面的N行输入多组数据,每组输入数据都是占一行,有三个字符组成,之间无空格。输出对于每组输入数据,输出一行,字符中间用一个空格分开。样例输入3qweasdzxc样例输出e q wa d sc x z #includeint main(){ int i; char str[4]; scanf("%d" , &i); getchar(); while(i--){ get 阅读全文

posted @ 2013-07-17 18:33 勇敢的炮灰 阅读(156) 评论(0) 推荐(0)