結果
問題 | No.384 マス埋めゲーム2 |
ユーザー |
![]() |
提出日時 | 2016-07-01 23:00:31 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 309 bytes |
コンパイル時間 | 561 ms |
コンパイル使用メモリ | 53,596 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-12 01:03:49 |
合計ジャッジ時間 | 1,644 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 22 |
ソースコード
#include <iostream> using namespace std; int main (void) { long long int H, W, N, K, ans = 0; cin.tie(0); ios::sync_with_stdio(false); cin >> H >> W >> N >> K; ans = (H + W - 1) % N; if (ans == 0) ans += N; if (ans == K) cout << "YES\n"; else cout << "NO\n"; return 0; }