結果
問題 | No.166 マス埋めゲーム |
ユーザー | ZackeyKei |
提出日時 | 2015-03-19 23:59:14 |
言語 | C++11 (gcc 11.4.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 430 bytes |
コンパイル時間 | 224 ms |
コンパイル使用メモリ | 26,060 KB |
実行使用メモリ | 528,632 KB |
最終ジャッジ日時 | 2023-09-11 08:49:36 |
合計ジャッジ時間 | 2,313 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 2 ms
4,376 KB |
testcase_01 | AC | 1 ms
4,380 KB |
testcase_02 | AC | 1 ms
4,380 KB |
testcase_03 | AC | 2 ms
4,376 KB |
testcase_04 | AC | 1 ms
4,376 KB |
testcase_05 | AC | 1 ms
4,380 KB |
testcase_06 | AC | 2 ms
4,376 KB |
testcase_07 | RE | - |
testcase_08 | AC | 2 ms
4,376 KB |
testcase_09 | MLE | - |
testcase_10 | -- | - |
testcase_11 | -- | - |
testcase_12 | -- | - |
testcase_13 | -- | - |
testcase_14 | -- | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
testcase_20 | -- | - |
testcase_21 | -- | - |
ソースコード
#include <cstdio> int main(void) { int h, w, n, k; int no = 0; scanf("%d%d%d%d", &h, &w, &n, &k); int **math = new int*[h]; for (int i = 0; i < h; i++) { math[i] = new int[w]; } for (int i = 0; i < h; i++) { for (int j = 0; j < w; j++) { no++; math[i][j] = no; if (no >= n) { no = 0; } } } if (math[h - 1][w - 1] == k) { printf("YES\n"); } else { printf("NO\n"); } return 0; }