Submission #3217893
Source Code Expand
# -*- coding: utf-8 -*- def fun_A(L): A = list(map(int, [x / 2 for x in L])) return A def fun_B(L): A = [x - 1 for x in L] return A def fun_seq(K, func_list): if len(func_list[-1]) >= K: return length = len(func_list[-1]) temp = 2 ** length for i in func_list[-temp:]: func_list.append(i + 'A') func_list.append(i + 'B') fun_seq(K, func_list) if __name__ == '__main__': N, K = map(int, input().split()) A = list(map(int, input().split())) func_list = ['A', 'B'] fun_seq(K, func_list) #print(len(func_list), func_list) count = 0 for i in func_list: for j in i: if j == 'A': A = fun_A(A) if j == 'B' and 0 not in A: A = fun_B(A) else: continue count += 1 print(count % 1000000007)
Submission Info
Submission Time | |
---|---|
Task | F - Shift and Decrement |
User | iKureha |
Language | Python (3.4.3) |
Score | 0 |
Code Size | 828 Byte |
Status | WA |
Exec Time | 2186 ms |
Memory | 1277044 KB |
Judge Result
Set Name | Sample | All | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 1200 | ||||||||||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample1.txt, sample2.txt, sample3.txt, sample4.txt |
All | sample1.txt, sample2.txt, sample3.txt, sample4.txt, 1.txt, 10.txt, 11.txt, 12.txt, 13.txt, 14.txt, 15.txt, 16.txt, 17.txt, 18.txt, 19.txt, 2.txt, 20.txt, 21.txt, 22.txt, 23.txt, 24.txt, 25.txt, 26.txt, 27.txt, 28.txt, 29.txt, 3.txt, 30.txt, 31.txt, 32.txt, 33.txt, 34.txt, 35.txt, 36.txt, 37.txt, 38.txt, 39.txt, 4.txt, 40.txt, 41.txt, 42.txt, 43.txt, 44.txt, 5.txt, 6.txt, 7.txt, 8.txt, 9.txt, sample1.txt, sample2.txt, sample3.txt, sample4.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
1.txt | TLE | 2182 ms | 1275508 KB |
10.txt | TLE | 2182 ms | 1267440 KB |
11.txt | TLE | 2181 ms | 1260020 KB |
12.txt | TLE | 2182 ms | 1270128 KB |
13.txt | TLE | 2182 ms | 1264496 KB |
14.txt | TLE | 2181 ms | 1266292 KB |
15.txt | TLE | 2106 ms | 45192 KB |
16.txt | TLE | 2182 ms | 1272820 KB |
17.txt | TLE | 2182 ms | 1269748 KB |
18.txt | TLE | 2182 ms | 1270260 KB |
19.txt | TLE | 2178 ms | 1211508 KB |
2.txt | TLE | 2183 ms | 1270516 KB |
20.txt | TLE | 2182 ms | 1262832 KB |
21.txt | TLE | 2182 ms | 1274480 KB |
22.txt | TLE | 2182 ms | 1269360 KB |
23.txt | TLE | 2184 ms | 1271412 KB |
24.txt | TLE | 2182 ms | 1271920 KB |
25.txt | TLE | 2183 ms | 1263856 KB |
26.txt | TLE | 2182 ms | 1272304 KB |
27.txt | TLE | 2182 ms | 1270384 KB |
28.txt | TLE | 2182 ms | 1277044 KB |
29.txt | TLE | 2183 ms | 1271920 KB |
3.txt | TLE | 2183 ms | 1273968 KB |
30.txt | TLE | 2182 ms | 1275504 KB |
31.txt | TLE | 2182 ms | 1267316 KB |
32.txt | TLE | 2182 ms | 1274228 KB |
33.txt | TLE | 2182 ms | 1265652 KB |
34.txt | TLE | 2182 ms | 1275248 KB |
35.txt | TLE | 2184 ms | 1271664 KB |
36.txt | TLE | 2106 ms | 45188 KB |
37.txt | TLE | 2182 ms | 1265396 KB |
38.txt | TLE | 2182 ms | 1277044 KB |
39.txt | TLE | 2183 ms | 1253236 KB |
4.txt | TLE | 2181 ms | 1260788 KB |
40.txt | TLE | 2184 ms | 1267184 KB |
41.txt | TLE | 2181 ms | 1264628 KB |
42.txt | TLE | 2186 ms | 1258096 KB |
43.txt | TLE | 2182 ms | 1268724 KB |
44.txt | TLE | 2181 ms | 1269360 KB |
5.txt | TLE | 2182 ms | 1267444 KB |
6.txt | TLE | 2182 ms | 1271920 KB |
7.txt | TLE | 2182 ms | 1263348 KB |
8.txt | TLE | 2182 ms | 1272560 KB |
9.txt | TLE | 2182 ms | 1267956 KB |
sample1.txt | AC | 17 ms | 3064 KB |
sample2.txt | WA | 17 ms | 3064 KB |
sample3.txt | TLE | 2182 ms | 1269336 KB |
sample4.txt | TLE | 2185 ms | 1268056 KB |