結果

問題 No.1557 Binary Variable
ユーザー 👑 rin204rin204
提出日時 2021-12-13 01:46:14
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 553 ms / 2,000 ms
コード長 198 bytes
コンパイル時間 825 ms
コンパイル使用メモリ 86,976 KB
実行使用メモリ 108,628 KB
最終ジャッジ日時 2023-09-28 20:34:50
合計ジャッジ時間 21,323 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 274 ms
97,124 KB
testcase_01 AC 290 ms
102,316 KB
testcase_02 AC 73 ms
71,236 KB
testcase_03 AC 74 ms
70,960 KB
testcase_04 AC 373 ms
98,424 KB
testcase_05 AC 368 ms
98,312 KB
testcase_06 AC 360 ms
98,456 KB
testcase_07 AC 386 ms
98,716 KB
testcase_08 AC 427 ms
98,336 KB
testcase_09 AC 442 ms
98,356 KB
testcase_10 AC 467 ms
98,352 KB
testcase_11 AC 469 ms
98,500 KB
testcase_12 AC 424 ms
98,532 KB
testcase_13 AC 486 ms
98,232 KB
testcase_14 AC 512 ms
98,964 KB
testcase_15 AC 480 ms
98,240 KB
testcase_16 AC 496 ms
98,936 KB
testcase_17 AC 496 ms
98,300 KB
testcase_18 AC 490 ms
98,160 KB
testcase_19 AC 533 ms
107,212 KB
testcase_20 AC 543 ms
107,680 KB
testcase_21 AC 544 ms
108,272 KB
testcase_22 AC 553 ms
107,468 KB
testcase_23 AC 552 ms
108,052 KB
testcase_24 AC 538 ms
104,032 KB
testcase_25 AC 536 ms
105,284 KB
testcase_26 AC 526 ms
102,264 KB
testcase_27 AC 524 ms
101,648 KB
testcase_28 AC 521 ms
99,956 KB
testcase_29 AC 503 ms
99,092 KB
testcase_30 AC 515 ms
99,544 KB
testcase_31 AC 497 ms
99,144 KB
testcase_32 AC 506 ms
99,276 KB
testcase_33 AC 547 ms
108,628 KB
testcase_34 AC 73 ms
71,180 KB
testcase_35 AC 74 ms
71,208 KB
testcase_36 AC 75 ms
71,364 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, m = map(int, input().split())
lr = [list(map(int, input().split())) for _ in range(m)]
lr.sort(key = lambda x:x[1])
bef = 0
for l, r in lr:
    if l > bef:
        bef = r
        n -= 1
print(n)
0