結果

問題 No.1813 Magical Stones
ユーザー MasKoaTSMasKoaTS
提出日時 2021-11-26 12:09:21
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 276 bytes
コンパイル時間 343 ms
コンパイル使用メモリ 87,120 KB
実行使用メモリ 80,304 KB
最終ジャッジ日時 2023-09-23 07:08:34
合計ジャッジ時間 7,101 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 77 ms
71,184 KB
testcase_01 AC 78 ms
71,292 KB
testcase_02 AC 76 ms
71,056 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 78 ms
71,340 KB
testcase_08 AC 83 ms
75,372 KB
testcase_09 WA -
testcase_10 AC 81 ms
75,208 KB
testcase_11 WA -
testcase_12 AC 77 ms
71,316 KB
testcase_13 AC 79 ms
71,444 KB
testcase_14 AC 86 ms
76,944 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 158 ms
80,176 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 152 ms
80,112 KB
testcase_21 AC 153 ms
80,012 KB
testcase_22 AC 146 ms
79,848 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 90 ms
76,712 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 AC 78 ms
71,284 KB
testcase_33 AC 80 ms
71,192 KB
testcase_34 AC 87 ms
76,284 KB
testcase_35 AC 95 ms
77,020 KB
testcase_36 AC 87 ms
76,268 KB
testcase_37 AC 102 ms
77,828 KB
testcase_38 AC 93 ms
77,480 KB
testcase_39 AC 124 ms
79,148 KB
testcase_40 AC 85 ms
76,484 KB
testcase_41 AC 88 ms
76,272 KB
testcase_42 AC 97 ms
77,260 KB
testcase_43 AC 90 ms
76,268 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#嘘解法( SCC を行わない)

import sys
input = sys.stdin.readline

N,M = map(int,input().split())

source = [True]*N
sink = [True]*N

for _ in [0]*M:
    a,b = map(int,input().split())
    source[a-1] = sink[b-1] = False

ans = max(sum(source),sum(sink))
print(ans)
0