結果
問題 |
No.1279 Array Battle
|
ユーザー |
![]() |
提出日時 | 2021-05-05 14:12:16 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 281 bytes |
コンパイル時間 | 117 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 24,096 KB |
最終ジャッジ日時 | 2024-09-13 06:57:01 |
合計ジャッジ時間 | 4,779 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 13 TLE * 1 -- * 6 |
ソースコード
import itertools n=int(input()) a=[*map(int,input().split())] b=[*map(int,input().split())] A=[*itertools.permutations(a)] chk=[] for i in A: cnt=0 for j in range(n): if i[j]>b[j]: cnt+=i[j]-b[j] chk.append(cnt) print(sum(max(chk)==i for i in chk))