結果
| 問題 |
No.1279 Array Battle
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-11-16 01:56:30 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 376 bytes |
| コンパイル時間 | 304 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-07-23 01:24:48 |
| 合計ジャッジ時間 | 11,499 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 19 TLE * 1 |
ソースコード
from itertools import permutations
ans = 0
n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
maxvalue = 0
for v in permutations(a):
submax = 0
for i in range(n):
submax += max(0, v[i] - b[i])
if submax > maxvalue:
ans = 1
maxvalue = submax
elif submax == maxvalue:
ans += 1
print(ans)