結果
問題 | No.1120 Strange Teacher |
ユーザー |
|
提出日時 | 2020-07-23 00:06:03 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 437 bytes |
コンパイル時間 | 307 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 50,232 KB |
最終ジャッジ日時 | 2024-06-23 02:30:18 |
合計ジャッジ時間 | 14,012 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | -- * 3 |
other | AC * 9 WA * 9 TLE * 1 -- * 8 |
ソースコード
import numpy as npimport sysN = int(input())A = np.array(input().split(), dtype=np.int64)B = np.array(input().split(), dtype=np.int64)C = B - Am = abs(C.min())count = 0while count <= m:S = np.unique(C)if len(S) == 2 and S.sum() == 0:count += abs(S[0])print(count)sys.exit()D = np.full(N, abs(C.min() + C.max()))D[C.argmax()] *= -1C = C + Dcount += abs(D[0])print(-1)