結果

問題 No.1557 Binary Variable
ユーザー U SU S
提出日時 2021-06-25 21:53:10
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 480 ms / 2,000 ms
コード長 552 bytes
コンパイル時間 364 ms
コンパイル使用メモリ 87,220 KB
実行使用メモリ 100,872 KB
最終ジャッジ日時 2023-09-07 14:28:56
合計ジャッジ時間 16,958 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 260 ms
97,564 KB
testcase_01 AC 271 ms
91,164 KB
testcase_02 AC 106 ms
73,236 KB
testcase_03 AC 104 ms
72,964 KB
testcase_04 AC 333 ms
91,096 KB
testcase_05 AC 328 ms
90,908 KB
testcase_06 AC 314 ms
91,232 KB
testcase_07 AC 325 ms
90,936 KB
testcase_08 AC 440 ms
100,872 KB
testcase_09 AC 447 ms
100,604 KB
testcase_10 AC 469 ms
99,612 KB
testcase_11 AC 480 ms
99,596 KB
testcase_12 AC 419 ms
100,388 KB
testcase_13 AC 478 ms
99,380 KB
testcase_14 AC 472 ms
97,752 KB
testcase_15 AC 478 ms
99,628 KB
testcase_16 AC 478 ms
97,972 KB
testcase_17 AC 466 ms
98,244 KB
testcase_18 AC 465 ms
98,348 KB
testcase_19 AC 459 ms
94,832 KB
testcase_20 AC 459 ms
95,232 KB
testcase_21 AC 472 ms
95,404 KB
testcase_22 AC 466 ms
94,944 KB
testcase_23 AC 472 ms
95,560 KB
testcase_24 AC 454 ms
91,896 KB
testcase_25 AC 453 ms
92,344 KB
testcase_26 AC 436 ms
91,476 KB
testcase_27 AC 436 ms
91,472 KB
testcase_28 AC 444 ms
91,224 KB
testcase_29 AC 440 ms
90,936 KB
testcase_30 AC 442 ms
90,712 KB
testcase_31 AC 436 ms
90,760 KB
testcase_32 AC 443 ms
91,180 KB
testcase_33 AC 472 ms
95,712 KB
testcase_34 AC 106 ms
73,488 KB
testcase_35 AC 107 ms
73,496 KB
testcase_36 AC 106 ms
73,516 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# import sys
# input = sys.stdin.readline
def mp():return map(int,input().split())
def lmp():return list(map(int,input().split()))
import math
import bisect
from copy import deepcopy as dc
from itertools import accumulate
from collections import Counter, defaultdict, deque
def ceil(U,V):return (U+V-1)//V
def modf1(N,MOD):return (N-1)%MOD+1
inf = int(1e30)
mod = int(1e9+7)

n,m = mp()
h = []
for i in range(m):
    a,b = mp()
    h.append((a,b))
h.sort(key=lambda x:x[1])
bot = 0
for i,j in h:
    if bot < i:
        n -= 1
        bot = j
print(n)
0