結果
問題 | No.1314 N言っちゃダメゲーム (5) |
ユーザー |
![]() |
提出日時 | 2020-12-11 04:13:23 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 567 bytes |
コンパイル時間 | 1,556 ms |
コンパイル使用メモリ | 167,244 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-19 21:06:03 |
合計ジャッジ時間 | 2,177 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 28 |
ソースコード
#include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef pair<ll,ll> P; typedef vector<ll> VI; typedef vector<VI> VVI; #define REP(i,n) for(int i=0;i<n;i++) #define ALL(v) v.begin(),v.end() constexpr ll MOD=998244353; constexpr ll INF=1e18; int main(){ int m, k; cin >> m >> k; m--; int w=m-(m/(k+1)), l=m-w; int f=(w+1)/2, s=w/2; if(w%2==1) f+=l; else s+=l; if(f>s) cout << "Win" << endl; else if(f<s) cout << "Lose" << endl; else cout << "Draw" << endl; return 0; }