結果
問題 | No.1679 マスゲーム |
ユーザー | 👑 obakyan |
提出日時 | 2021-09-12 12:20:10 |
言語 | Lua (LuaJit 2.1.1696795921) |
結果 |
WA
|
実行時間 | - |
コード長 | 241 bytes |
コンパイル時間 | 277 ms |
コンパイル使用メモリ | 5,296 KB |
実行使用メモリ | 6,076 KB |
最終ジャッジ日時 | 2023-09-06 05:52:35 |
合計ジャッジ時間 | 5,018 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | AC | 1 ms
4,380 KB |
testcase_02 | AC | 2 ms
4,376 KB |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | WA | - |
testcase_17 | AC | 1 ms
4,384 KB |
testcase_18 | WA | - |
testcase_19 | WA | - |
testcase_20 | WA | - |
testcase_21 | WA | - |
testcase_22 | WA | - |
testcase_23 | AC | 1 ms
4,380 KB |
testcase_24 | WA | - |
testcase_25 | WA | - |
testcase_26 | WA | - |
testcase_27 | WA | - |
ソースコード
n = io.read("*n") v = {} c = 0 for i = 1, n do tp = io.read("*n") a, b = io.read("*n", "*n") a = a - b if tp == 1 then if not v[a] then v[a] = 1 else v[a] = v[a] + 1 end else if v[a] then c = c + v[a] end end end print(c)