結果

問題 No.1995 CHIKA Road
ユーザー MasKoaTSMasKoaTS
提出日時 2022-02-19 14:14:52
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 209 ms / 2,000 ms
コード長 259 bytes
コンパイル時間 119 ms
コンパイル使用メモリ 10,648 KB
実行使用メモリ 30,100 KB
最終ジャッジ日時 2023-09-17 05:09:31
合計ジャッジ時間 5,195 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,784 KB
testcase_01 AC 13 ms
7,976 KB
testcase_02 AC 13 ms
7,764 KB
testcase_03 AC 12 ms
7,816 KB
testcase_04 AC 12 ms
7,816 KB
testcase_05 AC 13 ms
7,796 KB
testcase_06 AC 25 ms
9,728 KB
testcase_07 AC 60 ms
13,888 KB
testcase_08 AC 13 ms
7,784 KB
testcase_09 AC 13 ms
7,752 KB
testcase_10 AC 177 ms
26,240 KB
testcase_11 AC 200 ms
30,100 KB
testcase_12 AC 147 ms
29,160 KB
testcase_13 AC 65 ms
15,432 KB
testcase_14 AC 66 ms
15,648 KB
testcase_15 AC 173 ms
27,284 KB
testcase_16 AC 34 ms
10,736 KB
testcase_17 AC 113 ms
20,172 KB
testcase_18 AC 209 ms
28,384 KB
testcase_19 AC 209 ms
28,396 KB
testcase_20 AC 102 ms
19,100 KB
testcase_21 AC 91 ms
17,932 KB
testcase_22 AC 183 ms
27,156 KB
testcase_23 AC 59 ms
14,072 KB
testcase_24 AC 159 ms
24,832 KB
testcase_25 AC 40 ms
11,492 KB
testcase_26 AC 69 ms
14,792 KB
testcase_27 AC 152 ms
24,300 KB
testcase_28 AC 91 ms
18,064 KB
testcase_29 AC 202 ms
27,884 KB
testcase_30 AC 37 ms
11,240 KB
testcase_31 AC 24 ms
9,604 KB
testcase_32 AC 48 ms
12,188 KB
testcase_33 AC 154 ms
23,812 KB
testcase_34 AC 25 ms
9,764 KB
testcase_35 AC 64 ms
14,460 KB
testcase_36 AC 72 ms
15,612 KB
testcase_37 AC 191 ms
26,776 KB
testcase_38 AC 124 ms
21,180 KB
testcase_39 AC 24 ms
9,512 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

n, m = map(int,input().split())
plan = sorted([list(map(int,input().split())) for _ in [0] * m], key = lambda x : x[1])

now = 0
ans = 2 * (n - 1)
for l, r in plan:
	if(now > l):
		continue
	now = r
	ans -= 1
print(ans)
0