Submission #1498870
Source Code Expand
n,k=map(int,input().split()) s,p=list(input()),"" def proc(t): return ['B']+t[1:] if t[0]=='A' else ['A' if t[i]=='B' else 'B' for i in range(1,n)]+['A'] for i in range(2*n): s=proc(s) if i==k-1: print(''.join(s)) break else: if n%2==1 and k%2==1: s=proc(s) print(''.join(s))
Submission Info
Submission Time | |
---|---|
Task | D - Half Reflector |
User | fts2001 |
Language | PyPy3 (2.4.0) |
Score | 0 |
Code Size | 298 Byte |
Status | TLE |
Exec Time | 2116 ms |
Memory | 138008 KB |
Judge Result
Set Name | Sample | All | ||||||
---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 900 | ||||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample1.txt, sample2.txt, sample3.txt |
All | sample1.txt, sample2.txt, sample3.txt, in1.txt, in10.txt, in11.txt, in12.txt, in13.txt, in14.txt, in15.txt, in16.txt, in17.txt, in18.txt, in19.txt, in2.txt, in20.txt, in21.txt, in22.txt, in23.txt, in24.txt, in25.txt, in26.txt, in27.txt, in28.txt, in29.txt, in3.txt, in30.txt, in31.txt, in32.txt, in33.txt, in34.txt, in35.txt, in36.txt, in37.txt, in38.txt, in39.txt, in4.txt, in40.txt, in41.txt, in42.txt, in5.txt, in543.txt, in557.txt, in6.txt, in7.txt, in8.txt, in9.txt, sample1.txt, sample2.txt, sample3.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
in1.txt | AC | 166 ms | 38640 KB |
in10.txt | TLE | 2112 ms | 136728 KB |
in11.txt | TLE | 2113 ms | 136772 KB |
in12.txt | TLE | 2113 ms | 136788 KB |
in13.txt | TLE | 2112 ms | 136836 KB |
in14.txt | TLE | 2111 ms | 136672 KB |
in15.txt | TLE | 2113 ms | 136840 KB |
in16.txt | TLE | 2113 ms | 136904 KB |
in17.txt | TLE | 2116 ms | 136376 KB |
in18.txt | TLE | 2111 ms | 136236 KB |
in19.txt | TLE | 2113 ms | 136956 KB |
in2.txt | TLE | 2113 ms | 135356 KB |
in20.txt | TLE | 2112 ms | 136380 KB |
in21.txt | TLE | 2112 ms | 138008 KB |
in22.txt | TLE | 2112 ms | 136468 KB |
in23.txt | TLE | 2111 ms | 136300 KB |
in24.txt | TLE | 2113 ms | 136180 KB |
in25.txt | TLE | 2111 ms | 136720 KB |
in26.txt | TLE | 2111 ms | 137384 KB |
in27.txt | TLE | 2113 ms | 136752 KB |
in28.txt | TLE | 2112 ms | 136360 KB |
in29.txt | TLE | 2113 ms | 136300 KB |
in3.txt | TLE | 2112 ms | 136956 KB |
in30.txt | TLE | 2113 ms | 136748 KB |
in31.txt | TLE | 2113 ms | 136204 KB |
in32.txt | TLE | 2113 ms | 136872 KB |
in33.txt | TLE | 2111 ms | 136500 KB |
in34.txt | TLE | 2113 ms | 136724 KB |
in35.txt | TLE | 2113 ms | 136452 KB |
in36.txt | TLE | 2113 ms | 136904 KB |
in37.txt | TLE | 2113 ms | 135908 KB |
in38.txt | TLE | 2112 ms | 136648 KB |
in39.txt | TLE | 2113 ms | 136724 KB |
in4.txt | TLE | 2112 ms | 136508 KB |
in40.txt | TLE | 2114 ms | 136356 KB |
in41.txt | TLE | 2112 ms | 136576 KB |
in42.txt | TLE | 2113 ms | 136956 KB |
in5.txt | TLE | 2113 ms | 136500 KB |
in543.txt | TLE | 2112 ms | 135952 KB |
in557.txt | TLE | 2112 ms | 136948 KB |
in6.txt | AC | 161 ms | 38256 KB |
in7.txt | TLE | 2113 ms | 136828 KB |
in8.txt | TLE | 2112 ms | 136816 KB |
in9.txt | TLE | 2113 ms | 136512 KB |
sample1.txt | AC | 160 ms | 38256 KB |
sample2.txt | AC | 161 ms | 38256 KB |
sample3.txt | AC | 161 ms | 38256 KB |