Cipher Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 19502 Accepted: 5239 Description Bob and Alice started to use a brand-new encoding scheme. Surprisingly it is not a P…
这题一开始没看清楚 等级差距不超过1 1->2->3 就是错误的,因为3-1==2 ,意思是间接的也不行 其次等级最小是1,最大是n 你要到达1号首领的位置 假设1号等级x,限制m,最大上限hi,下限lo hi - lo <= m lo <= x <= hi 枚举 hi 和 lo #include <iostream> #include <cstdio> #include <queue> #include <cstring> #…
链接:http://poj.org/problem?id=1026 Cipher Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 21436 Accepted: 5891 Description Bob and Alice started to use a brand-new encoding scheme. Surprisingly it is not a Public Key Cryptosystem, but t…