結果
問題 | No.1390 Get together |
ユーザー | masashi0217 |
提出日時 | 2021-03-22 07:06:45 |
言語 | Ruby (3.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 251 bytes |
コンパイル時間 | 522 ms |
コンパイル使用メモリ | 11,284 KB |
実行使用メモリ | 24,516 KB |
最終ジャッジ日時 | 2023-08-15 09:35:30 |
合計ジャッジ時間 | 13,417 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 79 ms
15,232 KB |
testcase_01 | AC | 79 ms
15,140 KB |
testcase_02 | AC | 80 ms
15,212 KB |
testcase_03 | AC | 88 ms
15,544 KB |
testcase_04 | AC | 87 ms
15,576 KB |
testcase_05 | WA | - |
testcase_06 | AC | 88 ms
15,592 KB |
testcase_07 | WA | - |
testcase_08 | AC | 87 ms
15,452 KB |
testcase_09 | AC | 89 ms
15,544 KB |
testcase_10 | AC | 79 ms
15,160 KB |
testcase_11 | WA | - |
testcase_12 | AC | 80 ms
15,088 KB |
testcase_13 | WA | - |
testcase_14 | AC | 79 ms
15,272 KB |
testcase_15 | AC | 79 ms
15,260 KB |
testcase_16 | WA | - |
testcase_17 | AC | 508 ms
24,256 KB |
testcase_18 | AC | 418 ms
15,340 KB |
testcase_19 | WA | - |
testcase_20 | WA | - |
testcase_21 | WA | - |
testcase_22 | WA | - |
testcase_23 | WA | - |
testcase_24 | WA | - |
testcase_25 | AC | 517 ms
24,248 KB |
testcase_26 | WA | - |
testcase_27 | WA | - |
testcase_28 | AC | 516 ms
24,128 KB |
testcase_29 | WA | - |
testcase_30 | WA | - |
testcase_31 | WA | - |
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - m Syntax OK
ソースコード
n, m = gets.chomp.split(" ").map(&:to_i) hash = Hash.new(0) count = 0 iru = Hash.new(0) n.times do b, c = gets.chomp.split(" ").map(&:to_i) count += 1 if hash[c] >= 1 count -= 1 if iru[c] == b iru[c] = b hash[c] += 1 end puts count