結果
| 問題 | No.200 カードファイト! |
| コンテスト | |
| ユーザー |
titia
|
| 提出日時 | 2025-12-31 05:09:15 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 490 bytes |
| 記録 | |
| コンパイル時間 | 325 ms |
| コンパイル使用メモリ | 82,772 KB |
| 実行使用メモリ | 54,488 KB |
| 最終ジャッジ日時 | 2025-12-31 05:09:18 |
| 合計ジャッジ時間 | 2,613 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 16 WA * 10 |
ソースコード
import sys
input = sys.stdin.readline
N=int(input())
x=int(input())
A=list(map(int,input().split()))
y=int(input())
B=list(map(int,input().split()))
A.sort(reverse=True)
B.sort(reverse=True)
while len(A)<N:
A+=A
A=A[:N]
ANS=0
B0=B[:]
for i in range(N):
if B==[]:
B=B0[:]
a=A[i]
ind=-1
for j in range(len(B)):
if B[j]<a:
ind=j
break
if ind==-1:
B.pop(0)
else:
ANS+=1
B.pop(ind)
print(ANS)
titia