II ID DI DD ?D ??
1 2 2 1 3 6
Permutation {1,2,3} has signature "II".
Permutations {1,3,2} and {2,3,1} have signature "ID".
Permutations {3,1,2} and {2,1,3} have signature "DI".
Permutation {3,2,1} has signature "DD".
"?D" can be either "ID" or "DD".
"??" gives all possible permutations of length 3.
Migrated from old NTUJ.
ACM ICPC Dalian 2011
No. | Testdata Range | Score |
---|