結果

問題 No.2796 Small Matryoshka
ユーザー rlangevinrlangevin
提出日時 2024-06-30 16:37:45
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 223 bytes
コンパイル時間 146 ms
コンパイル使用メモリ 82,296 KB
実行使用メモリ 89,672 KB
最終ジャッジ日時 2024-06-30 16:37:53
合計ジャッジ時間 7,955 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 8 WA * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
D = []
for i in range(N):
    l, r = map(int, input().split())
    D.append((r, l))
    
now = 0
D.sort()
ans = N
for r, l in D:
    if l >= now:
        now = r
        ans -= 1
        
print(ans)        
0