結果
| 問題 | No.3468 あるジャッジサーバー |
| コンテスト | |
| ユーザー |
sasa8uyauya
|
| 提出日時 | 2026-03-06 22:50:39 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 280 bytes |
| 記録 | |
| コンパイル時間 | 280 ms |
| コンパイル使用メモリ | 85,672 KB |
| 実行使用メモリ | 61,236 KB |
| 最終ジャッジ日時 | 2026-03-06 22:50:41 |
| 合計ジャッジ時間 | 1,517 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 7 WA * 9 |
ソースコード
n=int(input())
t=list(map(int,input().split()))
s=list(map(int,input().split()))
q=[(s[i],s[i]+t[i]-1) for i in range(n)]
q.sort(key=lambda x:x[1])
q.reverse()
a=0
r=-1
while len(q)>0:
while len(q)>0 and q[-1][0]<=r:
q.pop()
if len(q)>0:
a+=1
r=q.pop()[1]
print(a)
sasa8uyauya