結果
| 問題 |
No.1919 Many Monster Battles
|
| コンテスト | |
| ユーザー |
とりゐ
|
| 提出日時 | 2022-04-04 00:02:23 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 290 bytes |
| コンパイル時間 | 287 ms |
| コンパイル使用メモリ | 82,168 KB |
| 実行使用メモリ | 139,088 KB |
| 最終ジャッジ日時 | 2024-06-11 20:23:19 |
| 合計ジャッジ時間 | 6,660 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 TLE * 1 -- * 21 |
ソースコード
n=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
ans1,ans2=0,0
mod=10**9+7
for i in range(n):
for j in range(n):
A=abs(a[i]-a[j])
B=abs(b[i]-b[j])
if A>B:
ans1+=A
ans1%=mod
if A<B:
ans2+=B
ans2%=mod
print(ans1,ans2)
とりゐ