結果
問題 |
No.1279 Array Battle
|
ユーザー |
|
提出日時 | 2020-11-23 23:46:19 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 251 ms / 2,000 ms |
コード長 | 513 bytes |
コンパイル時間 | 216 ms |
コンパイル使用メモリ | 82,040 KB |
実行使用メモリ | 133,812 KB |
最終ジャッジ日時 | 2024-07-23 18:08:50 |
合計ジャッジ時間 | 2,693 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 20 |
ソースコード
import itertools n = int(input()) a = [] b = [] count = 1 a = list(map(int,input().split())) b = list(map(int,input().split())) permutate_a =list(itertools.permutations(a)) score=[0 for i in range(len(permutate_a))] for i in range(len(permutate_a)): for j in range(n): if permutate_a[i][j]-b[j]>0: score[i] += permutate_a[i][j]-b[j] score.sort(reverse=True) for i in range(1,len(score)): if(score[i]==score[i-1]): count += 1 else: break print(count)