HDU 4585 Shaolin (set的应用)】的更多相关文章

Shaolin Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 65535/32768 K (Java/Others) Total Submission(s): 3191    Accepted Submission(s): 1350 Problem Description Shaolin temple is very famous for its Kongfu monks.A lot of young men go to Shao…
Shaolin Time Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64u Submit cid=57992#status//C/0" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" style="font-family:Verdana,Arial,sans…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4585 题目大意:不停的插入数字,问你跟他相距近的ID号.如果有两个距离相近的话选择小的那个. 用map,先用upper_bound找到大的,然后迭代器减1,就能够找到相近的两个. 然后..用链表不知道为什么有问题.... 而且迭代器it,如果减1的话,不能写 it2 = --it1; 这样会wa 但是..it2 = it1; it2--;这样就AC了,在这里记录一下,今后注意. //#pragma…
Shaolin Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 65535/32768 K (Java/Others) Problem Description Shaolin temple is very famous for its Kongfu monks.A lot of young men go to Shaolin temple every year, trying to be a monk there. The mast…
Shaolin Time Limit: 1000 MS Memory Limit: 32768 KB 64-bit integer IO format: %I64d , %I64u Java class name: Main [Submit] [Status] [Discuss] Description Shaolin temple is very famous for its Kongfu monks.A lot of young men go to Shaolin temple every…
Problem Description Shaolin temple is very famous for its Kongfu monks.A lot of young men go to Shaolin temple every year, trying to be a monk there. The master of Shaolin evaluates a young man mainly by his talent on understanding the Buddism script…
Shaolin Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 315    Accepted Submission(s): 162 Problem Description Shaolin temple is very famous for its Kongfu monks.A lot of young men go to Shaolin…
Shaolin Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 64    Accepted Submission(s): 38 Problem Description Shaolin temple is very famous for its Kongfu monks.A lot of young men go to Shaolin t…
Shaolin Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 4370    Accepted Submission(s): 1883 Problem Description Shaolin temple is very famous for its Kongfu monks.A lot of young men go to Shaol…
原题链接:http://acm.hust.edu.cn/vjudge/problem/viewProblem.action?id=46093 #include<algorithm> #include<iostream> #include<cstdlib> #include<cstdio> ; struct Node { int v, s; Node *ch[]; inline void set(int _v, int _s , Node *p) { ch[]…