結果

問題 No.1557 Binary Variable
ユーザー roarisroaris
提出日時 2021-07-03 14:00:48
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 210 ms / 2,000 ms
コード長 248 bytes
コンパイル時間 429 ms
コンパイル使用メモリ 86,892 KB
実行使用メモリ 94,004 KB
最終ジャッジ日時 2023-09-12 18:11:26
合計ジャッジ時間 12,564 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 208 ms
93,516 KB
testcase_01 AC 207 ms
93,164 KB
testcase_02 AC 71 ms
71,056 KB
testcase_03 AC 71 ms
71,220 KB
testcase_04 AC 207 ms
93,728 KB
testcase_05 AC 199 ms
93,592 KB
testcase_06 AC 202 ms
93,708 KB
testcase_07 AC 205 ms
94,004 KB
testcase_08 AC 200 ms
93,788 KB
testcase_09 AC 199 ms
93,868 KB
testcase_10 AC 204 ms
93,804 KB
testcase_11 AC 199 ms
93,560 KB
testcase_12 AC 200 ms
93,908 KB
testcase_13 AC 206 ms
93,784 KB
testcase_14 AC 210 ms
93,328 KB
testcase_15 AC 208 ms
93,548 KB
testcase_16 AC 207 ms
93,480 KB
testcase_17 AC 205 ms
93,480 KB
testcase_18 AC 207 ms
93,508 KB
testcase_19 AC 206 ms
93,140 KB
testcase_20 AC 204 ms
93,096 KB
testcase_21 AC 203 ms
93,312 KB
testcase_22 AC 199 ms
93,472 KB
testcase_23 AC 198 ms
92,960 KB
testcase_24 AC 202 ms
93,040 KB
testcase_25 AC 201 ms
92,880 KB
testcase_26 AC 202 ms
93,200 KB
testcase_27 AC 194 ms
93,132 KB
testcase_28 AC 198 ms
93,060 KB
testcase_29 AC 202 ms
92,760 KB
testcase_30 AC 202 ms
92,552 KB
testcase_31 AC 200 ms
92,960 KB
testcase_32 AC 206 ms
93,156 KB
testcase_33 AC 201 ms
93,460 KB
testcase_34 AC 72 ms
71,276 KB
testcase_35 AC 73 ms
71,124 KB
testcase_36 AC 69 ms
71,388 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

N, M = map(int, input().split())
LR = [tuple(map(int, input().split())) for _ in range(M)]
LR.sort(reverse=True)
now = 10**18
ans = N

for L, R in LR:
    if R<now:
        ans -= 1
        now = L

print(ans)
0