結果
| 問題 | No.1279 Array Battle |
| コンテスト | |
| ユーザー |
mesame3993
|
| 提出日時 | 2021-11-18 19:12:18 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 79 ms / 2,000 ms |
| コード長 | 363 bytes |
| 記録 | |
| コンパイル時間 | 184 ms |
| コンパイル使用メモリ | 85,504 KB |
| 実行使用メモリ | 94,192 KB |
| 最終ジャッジ日時 | 2026-06-01 15:09:03 |
| 合計ジャッジ時間 | 2,006 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 20 |
ソースコード
def main():
from sys import stdin
from itertools import permutations
readline=stdin.readline
n = int(readline())
A = list(map(int, readline().split()))
B = list(map(int, readline().split()))
ans = []
for a in permutations(A):
tmp = 0
for j in range(n):
tmp += max(a[j]-B[j], 0)
ans.append(tmp)
print(ans.count(max(ans)))
main()
mesame3993