結果

問題 No.2372 既視感
ユーザー KowerKoint2010KowerKoint2010
提出日時 2023-06-28 08:17:26
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 549 bytes
コンパイル時間 184 ms
コンパイル使用メモリ 11,252 KB
実行使用メモリ 19,040 KB
最終ジャッジ日時 2023-09-18 08:37:42
合計ジャッジ時間 3,834 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
15,020 KB
testcase_01 AC 81 ms
15,036 KB
testcase_02 AC 80 ms
15,064 KB
testcase_03 AC 79 ms
15,376 KB
testcase_04 AC 80 ms
15,068 KB
testcase_05 WA -
testcase_06 AC 80 ms
15,048 KB
testcase_07 AC 81 ms
15,312 KB
testcase_08 WA -
testcase_09 AC 82 ms
15,656 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 87 ms
16,208 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 84 ms
15,116 KB
testcase_23 AC 93 ms
17,212 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 AC 92 ms
17,336 KB
testcase_28 AC 94 ms
19,040 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n, k, q = gets.split.map(&:to_i)
a = []
q.times do
  op = gets.to_i
  if op == 1
    s = gets.chomp
    a << s
  else
    t = []
    d = []
    6.times do
      ti, di = gets.split
      t << ti
      d << di.to_i
    end
    ans = 0
    solve_duaration = 0
    while ans < 6
      if a != nil and a[-[n,a.length].min..-1].include?(t[ans])
        solve_duaration += [d[ans], k].min
      else
        solve_duaration += d[ans]
      end
      if solve_duaration > 60
        break
      end
      ans += 1
    end
    puts ans
    a += t
  end
end
0