結果
問題 |
No.166 マス埋めゲーム
|
ユーザー |
|
提出日時 | 2015-04-18 21:58:33 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 356 bytes |
コンパイル時間 | 173 ms |
コンパイル使用メモリ | 33,408 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-04 16:24:37 |
合計ジャッジ時間 | 890 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 13 WA * 7 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:10:15: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 10 | fscanf(stdin, "%d %d %d %d", &H, &W, &N, &K); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <cstdio> #include <vector> using namespace std; int main(){ using std::vector; int H, W, N, K; int i; int size; fscanf(stdin, "%d %d %d %d", &H, &W, &N, &K); size = H * W; if (size > N) { size = size % N; } //vector<vector<int>> arr(H, vector<int>(W)); if (size == K) { printf("YES\n"); } else { printf("NO\n"); } return 0; }