Submission #1498843
Source Code Expand
n,k=map(int,input().split()) s=list(input()) for i in range(k): cur,d,p=0,1,str(s) while cur>=0 and cur<n: if s[cur]=='A': s[cur]='B' d=-d cur+=d else: s[cur]='A' cur+=d if str(s)==p: break print(''.join(s))
Submission Info
Submission Time | |
---|---|
Task | D - Half Reflector |
User | fts2001 |
Language | PyPy3 (2.4.0) |
Score | 0 |
Code Size | 245 Byte |
Status | TLE |
Exec Time | 2111 ms |
Memory | 136128 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 | 245 ms | 44252 KB |
in10.txt | TLE | 2111 ms | 134100 KB |
in11.txt | TLE | 2109 ms | 132564 KB |
in12.txt | TLE | 2109 ms | 132356 KB |
in13.txt | TLE | 2110 ms | 134880 KB |
in14.txt | TLE | 2109 ms | 133076 KB |
in15.txt | TLE | 2110 ms | 134796 KB |
in16.txt | TLE | 2109 ms | 132732 KB |
in17.txt | TLE | 2109 ms | 133536 KB |
in18.txt | TLE | 2109 ms | 129616 KB |
in19.txt | TLE | 2110 ms | 131804 KB |
in2.txt | TLE | 2111 ms | 131804 KB |
in20.txt | TLE | 2108 ms | 134096 KB |
in21.txt | TLE | 2110 ms | 130728 KB |
in22.txt | TLE | 2110 ms | 133004 KB |
in23.txt | TLE | 2110 ms | 136128 KB |
in24.txt | TLE | 2110 ms | 134512 KB |
in25.txt | TLE | 2110 ms | 130964 KB |
in26.txt | TLE | 2110 ms | 131408 KB |
in27.txt | TLE | 2110 ms | 134096 KB |
in28.txt | TLE | 2110 ms | 134556 KB |
in29.txt | TLE | 2109 ms | 134864 KB |
in3.txt | TLE | 2109 ms | 134028 KB |
in30.txt | TLE | 2109 ms | 131348 KB |
in31.txt | TLE | 2110 ms | 134964 KB |
in32.txt | TLE | 2109 ms | 131644 KB |
in33.txt | TLE | 2109 ms | 131536 KB |
in34.txt | TLE | 2110 ms | 134096 KB |
in35.txt | TLE | 2110 ms | 134852 KB |
in36.txt | TLE | 2110 ms | 133076 KB |
in37.txt | TLE | 2110 ms | 133588 KB |
in38.txt | TLE | 2110 ms | 134484 KB |
in39.txt | TLE | 2109 ms | 132052 KB |
in4.txt | TLE | 2110 ms | 134084 KB |
in40.txt | TLE | 2109 ms | 133328 KB |
in41.txt | TLE | 2110 ms | 134940 KB |
in42.txt | TLE | 2110 ms | 132152 KB |
in5.txt | TLE | 2110 ms | 133640 KB |
in543.txt | TLE | 2110 ms | 133172 KB |
in557.txt | TLE | 2110 ms | 131212 KB |
in6.txt | AC | 162 ms | 38256 KB |
in7.txt | TLE | 2109 ms | 131196 KB |
in8.txt | TLE | 2109 ms | 133172 KB |
in9.txt | TLE | 2110 ms | 134216 KB |
sample1.txt | AC | 162 ms | 38256 KB |
sample2.txt | AC | 162 ms | 38256 KB |
sample3.txt | AC | 166 ms | 38256 KB |