提出 #73196193


ソースコード 拡げる

n=int(input())
nn=sorted(list(map(int,input().split(' '))))
an=[]
for k in range(2):
  if k==1:
    nm=max(nn)
    for i in range(len(nn)):
      if nn[-1]!=nm:
        break
      else:
        nn.pop()
    f=nm
  l=len(nn)
  if l==0:
    an.append(f)
  elif l%2==0:
    f=0
    for i in range(l//2):
      if f==0:
        f=nn[i]+nn[l-1-i]
      elif f!=nn[i]+nn[l-1-i]:
        f=-1
    if f>0:
      an.append(f)
print(*sorted(an))

提出情報

提出日時
問題 C - AtCoder Riko
ユーザ bscdesu
言語 Python (CPython 3.13.7)
得点 350
コード長 460 Byte
結果 WA
実行時間 160 ms
メモリ 42840 KiB

ジャッジ結果

セット名 Sample All after_contest
得点 / 配点 0 / 0 350 / 350 0 / 0
結果
AC × 3
AC × 22
AC × 2
WA × 1
セット名 テストケース
Sample 0_sample_1.txt, 0_sample_2.txt, 0_sample_3.txt
All 0_sample_1.txt, 0_sample_2.txt, 0_sample_3.txt, 1_1.txt, 1_2.txt, 1_3.txt, 1_4.txt, 1_5.txt, 2_1.txt, 2_2.txt, 2_3.txt, 2_4.txt, 3_1.txt, 3_2.txt, 3_3.txt, 3_4.txt, 3_5.txt, 3_6.txt, 4_1.txt, 4_2.txt, 4_3.txt, 4_4.txt
after_contest after_contest_1.txt, after_contest_2.txt, after_contest_3.txt
ケース名 結果 実行時間 メモリ
0_sample_1.txt AC 10 ms 9336 KiB
0_sample_2.txt AC 10 ms 9196 KiB
0_sample_3.txt AC 10 ms 9216 KiB
1_1.txt AC 145 ms 42036 KiB
1_2.txt AC 109 ms 41928 KiB
1_3.txt AC 130 ms 42656 KiB
1_4.txt AC 132 ms 42696 KiB
1_5.txt AC 135 ms 42052 KiB
2_1.txt AC 122 ms 42432 KiB
2_2.txt AC 127 ms 41852 KiB
2_3.txt AC 124 ms 42196 KiB
2_4.txt AC 125 ms 41940 KiB
3_1.txt AC 160 ms 42132 KiB
3_2.txt AC 154 ms 41924 KiB
3_3.txt AC 155 ms 41784 KiB
3_4.txt AC 102 ms 42028 KiB
3_5.txt AC 11 ms 9276 KiB
3_6.txt AC 120 ms 41700 KiB
4_1.txt AC 61 ms 14888 KiB
4_2.txt AC 83 ms 42840 KiB
4_3.txt AC 11 ms 9356 KiB
4_4.txt AC 10 ms 9356 KiB
after_contest_1.txt AC 10 ms 9184 KiB
after_contest_2.txt AC 10 ms 9336 KiB
after_contest_3.txt WA 10 ms 9332 KiB