結果
問題 | No.1120 Strange Teacher |
ユーザー | ytft |
提出日時 | 2021-05-07 08:44:27 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 392 bytes |
コンパイル時間 | 260 ms |
コンパイル使用メモリ | 87,088 KB |
実行使用メモリ | 101,268 KB |
最終ジャッジ日時 | 2023-10-12 23:50:32 |
合計ジャッジ時間 | 4,686 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | WA | - |
testcase_02 | WA | - |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | AC | 72 ms
71,516 KB |
testcase_10 | AC | 111 ms
101,268 KB |
testcase_11 | AC | 110 ms
101,056 KB |
testcase_12 | AC | 112 ms
101,160 KB |
testcase_13 | AC | 112 ms
101,084 KB |
testcase_14 | AC | 112 ms
101,160 KB |
testcase_15 | AC | 112 ms
101,080 KB |
testcase_16 | AC | 115 ms
101,268 KB |
testcase_17 | AC | 114 ms
101,024 KB |
testcase_18 | AC | 71 ms
71,452 KB |
testcase_19 | AC | 113 ms
99,548 KB |
testcase_20 | AC | 72 ms
71,004 KB |
testcase_21 | AC | 72 ms
71,360 KB |
testcase_22 | AC | 72 ms
71,372 KB |
testcase_23 | WA | - |
testcase_24 | WA | - |
testcase_25 | AC | 71 ms
71,372 KB |
testcase_26 | AC | 72 ms
71,448 KB |
testcase_27 | WA | - |
testcase_28 | WA | - |
testcase_29 | AC | 73 ms
71,452 KB |
ソースコード
N=int(input()) A=list(map(int,input().split())) B=list(map(int,input().split())) flg=0 if N==2: if sum(A)==sum(B): flg=1 time=abs(A[0]-B[0]) else: if (sum(A)-sum(B))%(N-2)==0: time=(sum(A)-sum(B))//(N-2) flg=1 for i in range(N): if (A[i]-B[i]+time)%2==1 or (B[i]>A[i]-time): flg=0 print(time if flg else -1)