結果
| 問題 |
No.2154 あさかつの参加人数
|
| コンテスト | |
| ユーザー |
WoqpDF
|
| 提出日時 | 2022-12-09 21:47:58 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 1,186 ms / 2,000 ms |
| コード長 | 386 bytes |
| コンパイル時間 | 242 ms |
| コンパイル使用メモリ | 82,144 KB |
| 実行使用メモリ | 220,620 KB |
| 最終ジャッジ日時 | 2024-10-14 21:30:26 |
| 合計ジャッジ時間 | 24,654 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 25 |
ソースコード
n,m =map(int,input().split())
import collections
llist = collections.defaultdict(int)
rlist = collections.defaultdict(int)
for i in range(m):
l,r =map(int,input().split())
llist[l] += 1
rlist[r] += 1
for i in reversed(range(1,n+1)):
if i == n:
temp = llist[i]
print(temp)
else:
temp += llist[i]
temp -= rlist[i+1]
print(temp)
WoqpDF