Submission #67322384
Source Code Expand
Copy
import syssys.setrecursionlimit(10**8)def divide(P):n=len(P)if n== 1:return P,[]m=n//2L=sort(P[:m])R=sort(P[m:])return L,Rdef sort(P):L,R=divide(P)if L+R<=R+L:return L+Relse:return R+LT=int(input())for _ in range(T):
import sys sys.setrecursionlimit(10**8) def divide(P): n=len(P) if n== 1: return P,[] m=n//2 L=sort(P[:m]) R=sort(P[m:]) return L,R def sort(P): L,R=divide(P) if L+R<=R+L: return L+R else: return R+L T=int(input()) for _ in range(T): N=int(input()) P=list(map(int, input().split())) ans=sort(P) print(*ans)
Submission Info
Submission Time | |
---|---|
Task | E - Reverse 2^i |
User | kotafuku |
Language | Python (PyPy 3.10-v7.3.12) |
Score | 450 |
Code Size | 411 Byte |
Status | AC |
Exec Time | 390 ms |
Memory | 133668 KiB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 450 / 450 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | 00_sample_00.txt |
All | 00_sample_00.txt, 01_test_00.txt, 01_test_01.txt, 01_test_02.txt, 01_test_03.txt, 01_test_04.txt, 01_test_05.txt, 01_test_06.txt, 01_test_07.txt, 01_test_08.txt, 01_test_09.txt, 01_test_10.txt, 01_test_11.txt, 01_test_12.txt, 01_test_13.txt, 01_test_14.txt, 01_test_15.txt, 01_test_16.txt, 01_test_17.txt, 01_test_18.txt, 01_test_19.txt, 01_test_20.txt, 01_test_21.txt, 01_test_22.txt, 01_test_23.txt, 01_test_24.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
00_sample_00.txt | AC | 57 ms | 76300 KiB |
01_test_00.txt | AC | 57 ms | 76424 KiB |
01_test_01.txt | AC | 58 ms | 76588 KiB |
01_test_02.txt | AC | 279 ms | 85020 KiB |
01_test_03.txt | AC | 134 ms | 84656 KiB |
01_test_04.txt | AC | 265 ms | 85504 KiB |
01_test_05.txt | AC | 263 ms | 89092 KiB |
01_test_06.txt | AC | 263 ms | 87080 KiB |
01_test_07.txt | AC | 263 ms | 89960 KiB |
01_test_08.txt | AC | 214 ms | 98932 KiB |
01_test_09.txt | AC | 214 ms | 103444 KiB |
01_test_10.txt | AC | 202 ms | 99504 KiB |
01_test_11.txt | AC | 230 ms | 130000 KiB |
01_test_12.txt | AC | 225 ms | 123992 KiB |
01_test_13.txt | AC | 244 ms | 110468 KiB |
01_test_14.txt | AC | 390 ms | 91948 KiB |
01_test_15.txt | AC | 213 ms | 133668 KiB |
01_test_16.txt | AC | 212 ms | 133220 KiB |
01_test_17.txt | AC | 209 ms | 133392 KiB |
01_test_18.txt | AC | 208 ms | 133460 KiB |
01_test_19.txt | AC | 233 ms | 132788 KiB |
01_test_20.txt | AC | 232 ms | 133140 KiB |
01_test_21.txt | AC | 228 ms | 127620 KiB |
01_test_22.txt | AC | 218 ms | 126852 KiB |
01_test_23.txt | AC | 209 ms | 127828 KiB |
01_test_24.txt | AC | 211 ms | 127884 KiB |