题意是说有N个字母组成的密码锁, 如[wersdfj], 每一位上的字母可以转动, w可转动变成x, z变成a.但是题目规定, 只能同时转动某个区间上的所有字母, 如[1,3], 那么第1到第3个的所有字母要同时转动,那么[ wersdfj ]经过一次操作就变成 [ xfssdfj ]. 一共有M 个区间是可以操作的. 题目还规定:If a lock can change to another after a sequence of operations, we regard them…
Code Lock Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/65536 K (Java/Others) Total Submission(s): 255 Accepted Submission(s): 114 Problem Description A lock you use has a code system to be opened instead of a key. The lock contains a…
You have a lock in front of you with 4 circular wheels. Each wheel has 10 slots: '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'. The wheels can rotate freely and wrap around: for example we can turn '9' to be '0', or '0' to be '9'. Each move consis…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3461 A lock you use has a code system to be opened instead of a key. The lock contains a sequence of wheels. Each wheel has the 26 letters of the English alphabet 'a' through 'z', in order. If you move a…