結果
問題 |
No.166 マス埋めゲーム
|
ユーザー |
![]() |
提出日時 | 2015-03-19 23:35:15 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 518 bytes |
コンパイル時間 | 598 ms |
コンパイル使用メモリ | 79,408 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-06-28 23:20:50 |
合計ジャッジ時間 | 1,346 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 2 |
other | AC * 8 WA * 12 |
ソースコード
#include <iostream> #include <string> #include <vector> #include <cmath> #include <algorithm> #include <cstdlib> #include <ctime> #include <cstdio> #include <functional> #include <set> #include <sstream> #include <map> #include <queue> #include <stack> using namespace std; const unsigned long long mod = 1000000000+7; int main() { unsigned long long h,w,n,k; cin>>h>>w>>n>>k; unsigned long long rest=(h*w)%k; if(k==1 && (h*w)%n==0 || k!=1 && rest==k) cout<<"YES"<<endl; else cout<<"NO"<<endl; return 0; }