結果
問題 | No.1338 Giant Class |
ユーザー |
![]() |
提出日時 | 2021-01-15 21:36:16 |
言語 | Crystal (1.14.0) |
結果 |
AC
|
実行時間 | 187 ms / 2,000 ms |
コード長 | 344 bytes |
コンパイル時間 | 11,173 ms |
コンパイル使用メモリ | 295,716 KB |
実行使用メモリ | 12,588 KB |
最終ジャッジ日時 | 2024-06-30 21:58:05 |
合計ジャッジ時間 | 15,063 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 21 |
ソースコード
lib Cfun strtoll(s : UInt8*, p : UInt8**, b : Int32) : Int64endclass Stringdef to_i64C.strtoll(self, nil, 10)endendh, w, q = read_line.split.map(&.to_i64)a = Hash(Int64, Int64).new(h)sum = h * wq.times do |i|y, x = read_line.split.map(&.to_i64.pred)if a[x] > ysum -= a[x] - ya[x] = yendputs sumend