結果

問題 No.2796 Small Matryoshka
ユーザー titia
提出日時 2024-07-30 08:14:29
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 255 bytes
コンパイル時間 390 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 53,812 KB
最終ジャッジ日時 2024-07-30 08:14:38
合計ジャッジ時間 7,043 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 8 WA * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

from operator import itemgetter

N=int(input())
AB=[list(map(int,input().split())) for i in range(N)]

AB.sort(key=itemgetter(1))

now=0
ANS=0
for a,b in AB:
    if now<=a:
        ANS+=1
        now=b

print(N-ANS)
0