結果

問題 No.1557 Binary Variable
ユーザー ch1channnch1channn
提出日時 2022-12-13 16:38:03
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 393 ms / 2,000 ms
コード長 491 bytes
コンパイル時間 240 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 108,596 KB
最終ジャッジ日時 2024-04-25 02:02:54
合計ジャッジ時間 13,771 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 157 ms
97,400 KB
testcase_01 AC 165 ms
96,940 KB
testcase_02 AC 35 ms
51,968 KB
testcase_03 AC 36 ms
51,968 KB
testcase_04 AC 246 ms
99,056 KB
testcase_05 AC 242 ms
98,944 KB
testcase_06 AC 222 ms
98,944 KB
testcase_07 AC 234 ms
99,072 KB
testcase_08 AC 276 ms
98,816 KB
testcase_09 AC 295 ms
98,868 KB
testcase_10 AC 323 ms
98,688 KB
testcase_11 AC 324 ms
98,688 KB
testcase_12 AC 286 ms
98,816 KB
testcase_13 AC 328 ms
99,200 KB
testcase_14 AC 339 ms
98,604 KB
testcase_15 AC 330 ms
99,200 KB
testcase_16 AC 338 ms
99,072 KB
testcase_17 AC 334 ms
99,072 KB
testcase_18 AC 346 ms
98,944 KB
testcase_19 AC 331 ms
98,336 KB
testcase_20 AC 342 ms
98,560 KB
testcase_21 AC 346 ms
98,536 KB
testcase_22 AC 353 ms
98,476 KB
testcase_23 AC 332 ms
98,780 KB
testcase_24 AC 334 ms
98,304 KB
testcase_25 AC 336 ms
98,688 KB
testcase_26 AC 331 ms
98,432 KB
testcase_27 AC 329 ms
98,176 KB
testcase_28 AC 347 ms
108,596 KB
testcase_29 AC 363 ms
107,816 KB
testcase_30 AC 365 ms
108,288 KB
testcase_31 AC 369 ms
107,964 KB
testcase_32 AC 393 ms
108,288 KB
testcase_33 AC 331 ms
98,460 KB
testcase_34 AC 36 ms
51,968 KB
testcase_35 AC 36 ms
51,968 KB
testcase_36 AC 38 ms
52,608 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
if sys.platform =='ios':
	import clipboard
	a=clipboard.get()
	a = a.split('\n')
	text = '\n'.join(a)
	with open('input_file.txt','w') as f:
		f.write(text)
	sys.stdin = open('input_file.txt')
	
from sys import stdin

readline = stdin.readline

N, M = map(int, readline().split())
LR = [list(map(int, readline().split())) for _ in range(M)]

result = N
t = -1
for L, R in sorted(LR, key=lambda x: x[1]):
    if L <= t <= R:
        continue
    result -= 1
    t = R
print(result)
0