結果
| 問題 |
No.2225 Treasure Searching Rod (Easy)
|
| コンテスト | |
| ユーザー |
hitonanode
|
| 提出日時 | 2023-02-24 23:10:04 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 10 ms / 2,000 ms |
| コード長 | 454 bytes |
| コンパイル時間 | 864 ms |
| コンパイル使用メモリ | 79,280 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-09-13 06:03:01 |
| 合計ジャッジ時間 | 1,785 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 23 |
ソースコード
#include <iostream>
using namespace std;
int main() {
cin.tie(nullptr), ios::sync_with_stdio(false);
int H, W, K;
cin >> H >> W >> K;
long long ret = 0;
while (K--) {
int x, y, v;
cin >> x >> y >> v;
for (int i = 1; i <= H; ++i) {
for (int j = 1; j <= W; ++j) {
if (x + y >= i + j and x - y >= i - j) ret += v;
}
}
}
cout << ret % 998244353 << endl;
}
hitonanode