結果
問題 |
No.384 マス埋めゲーム2
|
ユーザー |
![]() |
提出日時 | 2016-07-01 22:37:53 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 520 bytes |
コンパイル時間 | 501 ms |
コンパイル使用メモリ | 62,304 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-12 00:44:25 |
合計ジャッジ時間 | 1,312 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 22 |
ソースコード
#include <iostream> #include <algorithm> #include <vector> #include <cstdio> #include <cstdlib> #include <string> #include <cmath> using namespace std; #define rep(i,n) for(int i=0;i<(n);i++) #define reps(i,f,n) for(int i=(f);i<(n);i++) #define fi first #define se second int main(void){ long long h, w, n, k; cin >> h >> w >> n >> k; long long sum = h + w - 1; // if(h >= w) sum += w - 1; // else sum += h - 1; long long amari = sum % n; if(amari == (k % n)) printf("YES\n"); else printf("NO\n"); return 0; }