結果
| 問題 | No.2372 既視感 | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2023-07-26 13:53:50 | 
| 言語 | Ruby (3.4.1) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 294 bytes | 
| コンパイル時間 | 136 ms | 
| コンパイル使用メモリ | 7,552 KB | 
| 実行使用メモリ | 13,312 KB | 
| 最終ジャッジ日時 | 2024-10-03 01:03:46 | 
| 合計ジャッジ時間 | 3,972 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 25 WA * 1 | 
コンパイルメッセージ
Syntax OK
ソースコード
N,K,Q=gets.split.map &:to_i
a=[]
Q.times{
  if gets.to_i==1
    a.append gets.strip
  else
    z,c=60,0
    6.times{
      t,d=gets.split
      d=d.to_i
      if a.include? t; d = [d, K].min end
      z-=d
      if z>=0; c+=1; a.append(t) end
    }
    a.shift [0, a.size-N].max
    p c
  end
}
            
            
            
        