ソースコード 拡げる

Copy
```scale=0
define merge_sort(left, right){
auto mid, i, j, k, l, s
if(left == right || left == right-1)return
mid = (left+right)/2
s=merge_sort(left, mid)
s=merge_sort(mid, right)
i = left
j = mid
k = 0
while(i < mid && j < right){
if(a[i] <= a[j]){
b[k++] = a[i++]
}else{
b[k++] = a[j++]
}
}
if(i == mid){
while(j < right){
b[k++] = a[j++]
}
}else{
while(i < mid){
b[k++] = a[i++]
}
}
for(l=0;l<k;l++){
a[left+l] = b[l]
}
}

s=merge_sort(0, n)
q=A^5
for(i=0;i<n/2;i++){
temp = a[i]+a[n-1-i]
if(p<temp)p=temp
if(q>temp)q=temp
}
p-q
```

#### 提出情報

提出日時 2020-10-15 20:43:10+0900 A - Table Tennis Rssll_Krkgrd bc (1.07.1) 100 750 Byte AC 10 ms 2268 KB

#### ジャッジ結果

セット名 All

 AC × 27
セット名 テストケース
All 00-sample-00.txt, 00-sample-01.txt, 10-unique-00.txt, 10-unique-01.txt, 10-unique-02.txt, 10-unique-03.txt, 10-unique-04.txt, 20-order-00.txt, 20-order-01.txt, 20-order-02.txt, 20-order-03.txt, 20-order-04.txt, 30-random-00.txt, 30-random-01.txt, 30-random-02.txt, 30-random-03.txt, 30-random-04.txt, 30-random-05.txt, 30-random-06.txt, 30-random-07.txt, 30-random-08.txt, 30-random-09.txt, 30-random-10.txt, 30-random-11.txt, 30-random-12.txt, 30-random-13.txt, 30-random-14.txt
ケース名 結果 実行時間 メモリ
00-sample-00.txt AC 2 ms 2144 KB
00-sample-01.txt AC 2 ms 2112 KB
10-unique-00.txt AC 2 ms 2144 KB
10-unique-01.txt AC 3 ms 2152 KB
10-unique-02.txt AC 6 ms 2268 KB
10-unique-03.txt AC 4 ms 2204 KB
10-unique-04.txt AC 3 ms 2204 KB
20-order-00.txt AC 2 ms 2132 KB
20-order-01.txt AC 7 ms 2252 KB
20-order-02.txt AC 2 ms 2208 KB
20-order-03.txt AC 4 ms 2252 KB
20-order-04.txt AC 2 ms 2200 KB
30-random-00.txt AC 2 ms 2252 KB
30-random-01.txt AC 10 ms 2076 KB
30-random-02.txt AC 2 ms 2064 KB
30-random-03.txt AC 3 ms 2252 KB
30-random-04.txt AC 3 ms 2148 KB
30-random-05.txt AC 3 ms 2208 KB
30-random-06.txt AC 3 ms 2260 KB
30-random-07.txt AC 3 ms 2120 KB
30-random-08.txt AC 2 ms 2140 KB
30-random-09.txt AC 3 ms 2200 KB
30-random-10.txt AC 2 ms 2112 KB
30-random-11.txt AC 3 ms 2200 KB
30-random-12.txt AC 3 ms 2160 KB
30-random-13.txt AC 7 ms 2168 KB
30-random-14.txt AC 2 ms 2200 KB