| # | Problem | Pass Rate (passed user / total user) |
|---|---|---|
| 3366 | Areas |
|
| 3367 | Beloved Sons |
|
| 3368 | Strange Counter |
|
| 3369 | Data Transmission |
|
| 3370 | Strong Defence |
|
| 3371 | Weird Dissimilarity |
|
| 3372 | PL/Cool |
|
| 3373 | Royal Federation |
|
| 3374 | Two Cylinders |
|
| 3375 | (*) Factstone Benchmark |
|
| 3376 | (*) Bridge |
|
| 3377 | (*) Matches Game |
|
| 7501 | (*) Ants |
|
Description
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=2361
Input
Output
Sample Input Download
Sample Output Download
Tags
Discuss
Description
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=2362
Input
Output
Sample Input Download
Sample Output Download
Tags
Discuss
Description
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=2363
Input
Output
Sample Input Download
Sample Output Download
Tags
Discuss
Description
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=2364
Input
Output
Sample Input Download
Sample Output Download
Tags
Discuss
Description
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=2365
Input
Output
Sample Input Download
Sample Output Download
Tags
Discuss
Description
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=2366
Input
Output
Sample Input Download
Sample Output Download
Tags
Discuss
Description
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=2367
Input
Output
Sample Input Download
Sample Output Download
Tags
Discuss
Description
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=2368
Input
Output
Sample Input Download
Sample Output Download
Tags
Discuss
Description
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=2369
Input
Output
Sample Input Download
Sample Output Download
Tags
Discuss
Description
http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1857
Input
Output
Sample Input Download
Sample Output Download
Tags
Discuss
Description
http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=978
Input
Output
Sample Input Download
Sample Output Download
Tags
Discuss
Description
http://poj.org/problem?id=2234
Input
Output
Sample Input Download
Sample Output Download
Tags
Discuss
Description
一群螞蟻走在一條長度為 L 公分的繩子上,每隻螞蟻的速度為 1 cm/sec。當一隻螞蟻走到繩子的盡頭時,它馬上掉下繩子(再也爬不起來了)。當兩隻螞蟻在繩子上相遇時,馬上掉頭往另一個方向走去。我們知道每隻螞蟻在繩子上的位置,但不幸的是,我們並不知道每隻螞蟻開始時走的方向。
你的任務是算出最快和最慢可能需要多少時間,所有的螞蟻都掉出繩子外。
Input
輸入的第一列有一個整數,代表以下有多少組測試資料。
每組測試資料以2個整數 L, n 開始,L 代表繩子的長度(單位:cm),n 代表一開始時繩子上有多少隻螞蟻。接下來有 n 個整數代表這些螞蟻一開始在繩子上的位置(從繩子的左端算起),且這些位置並沒有一定順序。所有的這些數都不會超過 10000。
請參考Sample Input。
Output
對每組測試資料輸出一列,包含2個整數代表最快和最慢可能需要多少時間(秒),所有的螞蟻都掉出繩子外。