結果
問題 | No.938 賢人を探せ |
ユーザー | Azumabashi |
提出日時 | 2020-05-04 15:15:22 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
AC
|
実行時間 | 72 ms / 2,000 ms |
コード長 | 419 bytes |
コンパイル時間 | 80 ms |
コンパイル使用メモリ | 10,764 KB |
実行使用メモリ | 14,124 KB |
最終ジャッジ日時 | 2023-08-21 03:45:29 |
合計ジャッジ時間 | 2,121 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 72 ms
14,020 KB |
testcase_01 | AC | 15 ms
7,848 KB |
testcase_02 | AC | 16 ms
7,828 KB |
testcase_03 | AC | 16 ms
7,876 KB |
testcase_04 | AC | 16 ms
7,924 KB |
testcase_05 | AC | 15 ms
7,824 KB |
testcase_06 | AC | 15 ms
7,876 KB |
testcase_07 | AC | 15 ms
7,916 KB |
testcase_08 | AC | 53 ms
11,520 KB |
testcase_09 | AC | 54 ms
11,660 KB |
testcase_10 | AC | 15 ms
7,872 KB |
testcase_11 | AC | 61 ms
13,932 KB |
testcase_12 | AC | 52 ms
11,240 KB |
testcase_13 | AC | 52 ms
11,308 KB |
testcase_14 | AC | 51 ms
11,132 KB |
testcase_15 | AC | 52 ms
11,268 KB |
testcase_16 | AC | 50 ms
11,264 KB |
testcase_17 | AC | 52 ms
11,276 KB |
testcase_18 | AC | 52 ms
11,356 KB |
testcase_19 | AC | 52 ms
11,228 KB |
testcase_20 | AC | 51 ms
11,324 KB |
testcase_21 | AC | 52 ms
11,208 KB |
testcase_22 | AC | 71 ms
14,124 KB |
ソースコード
def main(): n = int(input()) cheating = [] cheated = [] checked = {} for _ in range(n): a, b = input().split() cheating.append(a) cheated.append(b) checked[b] = False cheating_set = set(cheating) for c in cheated: if c not in cheating_set and not checked[c]: print(c) checked[c] = True if __name__ == '__main__': main()