結果
| 問題 | No.1314 N言っちゃダメゲーム (5) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-12-20 14:16:48 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 396 bytes |
| コンパイル時間 | 1,572 ms |
| コンパイル使用メモリ | 165,540 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-18 01:49:56 |
| 合計ジャッジ時間 | 2,597 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 WA * 7 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main(){
ll m, k, f, s, a, b;
cin >> m >> k;
s = (m - 2) / (k + 1);
f = m - 1 - s;
if(f & 1){ a = (f + 1) / 2 + (s + 1) / 2, b = f / 2 + s / 2; }
else{ a = (f + 1) / 2 + s / 2, b = f / 2 + (s + 1) / 2;}
if(a > b) cout << "Win" << '\n';
else if(a == b) cout << "Draw" << '\n';
else cout << "Lose" << '\n';
}