Description “Be subtle! Be subtle! And use your spies for every kind of business. ”― Sun Tzu“A spy with insufficient ability really sucks”― An anonymous general who lost the warYou, a general, following Sun Tzu’s instruction, make heavy use of spies…
Description P. T. Tigris is a student currently studying graph theory. One day, when he was studying hard, GS appeared around the corner shyly and came up with a problem: Given a graph with n nodes and m undirected weighted edges, every node having o…
Browsing History http://acm.hdu.edu.cn/showproblem.php?pid=4464 签到 #include<cstdio> #include<algorithm> using namespace std; ]; int main(){ ; while(~scanf("%d",&n)){ ; while(n--){ scanf("%s",a); ; ;a[i];i++){ sum+=a[i];…
Sum of divisors Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 4318    Accepted Submission(s): 1382 Problem Description mmm is learning division, she's so proud of herself that she can figure…
Problem Description In this problem, you are given several strings that contain only digits from '0' to '9', inclusive.An example is shown below.101123The set S of strings is consists of the N strings given in the input file, and all the possible sub…
意甲冠军:给定的长度可达1000数的顺序,图像password像锁.可以上下滑动,同时会0-9周期. 每个操作.最多三个数字连续操作.现在给出的起始序列和靶序列,获得操作的最小数量,从起始序列与靶序列. 花了一天的时间.我觉得是道非常难的DP.这个阶段非常好划分,对于前面完毕的password锁就不再考虑.问题的关键是这个旋转每次能够的情况非常多. 同一时候也能够发现当I位置上确定移好后,至多影响到后两位.-> dp[i][j][k] 表示当前i位移好后,i+1 为j ,  i+2为k 的次数.…
Problem Description Conflicts are everywhere in the world, from the young to the elderly, from families to countries. Conflicts cause quarrels, fights or even wars. How wonderful the world will be if all conflicts can be eliminated.Edward contributes…
Problem Description There's a queue obeying the first in first out rule. Each time you can either push a number into the queue (+i), or pop a number out from the queue (-i). After a series of operation, you get a sequence (e.g. +1 -1 +2 +4 -2 -4). We…
Problem Description A password locker with N digits, each digit can be rotated to 0-9 circularly.You can rotate 1-3 consecutive digits up or down in one step.For examples:567890 -> 567901 (by rotating the last 3 digits up)000000 -> 000900 (by rotati…
Problem Description Japanese Mahjong is a four-player game. The game needs four people to sit around a desk and play with a set of Mahjong tiles. A set of Mahjong tiles contains four copies of the tiles described next:One to nine Man, which we use 1m…