結果

問題 No.938 賢人を探せ
ユーザー simansiman
提出日時 2020-12-13 18:40:04
言語 Ruby
(3.3.0)
結果
AC  
実行時間 161 ms / 2,000 ms
コード長 159 bytes
コンパイル時間 204 ms
コンパイル使用メモリ 11,496 KB
実行使用メモリ 24,388 KB
最終ジャッジ日時 2023-08-21 03:47:55
合計ジャッジ時間 3,999 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 161 ms
24,388 KB
testcase_01 AC 82 ms
15,144 KB
testcase_02 AC 82 ms
15,128 KB
testcase_03 AC 82 ms
15,052 KB
testcase_04 AC 82 ms
15,288 KB
testcase_05 AC 82 ms
15,032 KB
testcase_06 AC 83 ms
15,088 KB
testcase_07 AC 82 ms
15,252 KB
testcase_08 AC 129 ms
19,768 KB
testcase_09 AC 131 ms
19,912 KB
testcase_10 AC 82 ms
15,364 KB
testcase_11 AC 133 ms
20,408 KB
testcase_12 AC 128 ms
19,680 KB
testcase_13 AC 131 ms
19,852 KB
testcase_14 AC 129 ms
19,900 KB
testcase_15 AC 133 ms
19,920 KB
testcase_16 AC 132 ms
19,844 KB
testcase_17 AC 131 ms
19,576 KB
testcase_18 AC 128 ms
19,696 KB
testcase_19 AC 126 ms
19,660 KB
testcase_20 AC 127 ms
19,704 KB
testcase_21 AC 128 ms
19,724 KB
testcase_22 AC 147 ms
24,292 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

N = gets.to_i
Q = N.times.map { gets.chomp.split }
B = Hash.new(true)

Q.each do |a, b|
  B[b] &= true
  B[a] &= false
end

puts B.select { |name, f| f }.keys
0