Submission #38021770
Source Code Expand
(h,w),*S=[s*(s>'a')or map(int,s.split())for s in open(0)]
r=c=0
f=1
for a,b in S[h+1:]:r+=~-a*f;c+=~-b*f;f=-f
for-1<i<h:print(''.join(S[(r+i*f)%h][(c+j*f)%w]for-1<j<w))
Submission Info
| Submission Time | |
|---|---|
| Task | B - Grid Rotations |
| User | Pandruant |
| Language | Cython (0.29.16) |
| Score | 500 |
| Code Size | 168 Byte |
| Status | AC |
| Exec Time | 851 ms |
| Memory | 105220 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 500 / 500 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | 01_sample_01.txt, 01_sample_02.txt, 01_sample_03.txt |
| All | 01_sample_01.txt, 01_sample_02.txt, 01_sample_03.txt, 02_small_01.txt, 02_small_02.txt, 02_small_03.txt, 02_small_04.txt, 02_small_05.txt, 02_small_06.txt, 02_small_07.txt, 02_small_08.txt, 02_small_09.txt, 03_rand_01.txt, 03_rand_02.txt, 03_rand_03.txt, 03_rand_04.txt, 03_rand_05.txt, 04_square_01.txt, 04_square_02.txt, 04_square_03.txt, 04_square_04.txt, 04_square_05.txt, 05_max_H_01.txt, 05_max_H_02.txt, 05_max_H_03.txt, 05_max_H_04.txt, 05_max_H_05.txt, 06_max_W_01.txt, 06_max_W_02.txt, 06_max_W_03.txt, 06_max_W_04.txt, 06_max_W_05.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 01_sample_01.txt | AC | 56 ms | 9372 KiB |
| 01_sample_02.txt | AC | 21 ms | 9508 KiB |
| 01_sample_03.txt | AC | 23 ms | 9372 KiB |
| 02_small_01.txt | AC | 23 ms | 9400 KiB |
| 02_small_02.txt | AC | 26 ms | 9364 KiB |
| 02_small_03.txt | AC | 21 ms | 9368 KiB |
| 02_small_04.txt | AC | 25 ms | 9444 KiB |
| 02_small_05.txt | AC | 21 ms | 9524 KiB |
| 02_small_06.txt | AC | 20 ms | 9444 KiB |
| 02_small_07.txt | AC | 20 ms | 9448 KiB |
| 02_small_08.txt | AC | 21 ms | 9508 KiB |
| 02_small_09.txt | AC | 22 ms | 9492 KiB |
| 03_rand_01.txt | AC | 674 ms | 96056 KiB |
| 03_rand_02.txt | AC | 723 ms | 97576 KiB |
| 03_rand_03.txt | AC | 641 ms | 94068 KiB |
| 03_rand_04.txt | AC | 714 ms | 91796 KiB |
| 03_rand_05.txt | AC | 695 ms | 96884 KiB |
| 04_square_01.txt | AC | 773 ms | 98356 KiB |
| 04_square_02.txt | AC | 763 ms | 98272 KiB |
| 04_square_03.txt | AC | 763 ms | 98244 KiB |
| 04_square_04.txt | AC | 765 ms | 98284 KiB |
| 04_square_05.txt | AC | 770 ms | 98400 KiB |
| 05_max_H_01.txt | AC | 822 ms | 105200 KiB |
| 05_max_H_02.txt | AC | 821 ms | 105184 KiB |
| 05_max_H_03.txt | AC | 851 ms | 105220 KiB |
| 05_max_H_04.txt | AC | 832 ms | 105176 KiB |
| 05_max_H_05.txt | AC | 844 ms | 105192 KiB |
| 06_max_W_01.txt | AC | 672 ms | 87972 KiB |
| 06_max_W_02.txt | AC | 689 ms | 87960 KiB |
| 06_max_W_03.txt | AC | 667 ms | 87892 KiB |
| 06_max_W_04.txt | AC | 686 ms | 87900 KiB |
| 06_max_W_05.txt | AC | 628 ms | 87820 KiB |