結果
問題 |
No.166 マス埋めゲーム
|
ユーザー |
|
提出日時 | 2015-04-18 22:22:25 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 384 bytes |
コンパイル時間 | 244 ms |
コンパイル使用メモリ | 40,448 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-07-04 16:27:08 |
合計ジャッジ時間 | 928 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 12 WA * 8 |
コンパイルメッセージ
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, "%f %f %f %f", &H, &W, &N, &K); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <cstdio> #include <cmath> #include <vector> using namespace std; int main(){ using std::vector; float H, W, N, K; float size; fscanf(stdin, "%f %f %f %f", &H, &W, &N, &K); size = H * W; if (size > N) { size = fmod(size, N); } //vector<vector<int>> arr(H, vector<int>(W)); if ((int)size == (int)K) { printf("YES\n"); } else { printf("NO\n"); } return 0; }