結果
問題 | No.1279 Array Battle |
ユーザー |
👑 ![]() |
提出日時 | 2020-11-06 21:25:53 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 90 ms / 2,000 ms |
コード長 | 380 bytes |
コンパイル時間 | 284 ms |
コンパイル使用メモリ | 82,248 KB |
実行使用メモリ | 75,224 KB |
最終ジャッジ日時 | 2024-07-22 12:05:26 |
合計ジャッジ時間 | 2,043 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 20 |
ソースコード
import itertoolsN = int(input())A = list(map(int,input().split()))B = list(map(int,input().split()))maxi = 0ans = 0for x in itertools.permutations(A,N):now = 0cnt = 0for i in x:if i > B[cnt]:now += i-B[cnt]cnt += 1if now == maxi:ans += 1elif now > maxi:maxi = nowans = 1print (ans)