結果
問題 |
No.1314 N言っちゃダメゲーム (5)
|
ユーザー |
|
提出日時 | 2020-12-11 00:35:37 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 206 bytes |
コンパイル時間 | 510 ms |
コンパイル使用メモリ | 65,268 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-09-19 20:58:35 |
合計ジャッジ時間 | 1,206 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | AC * 10 WA * 18 |
コンパイルメッセージ
main.cpp:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 4 | main() | ^~~~
ソースコード
#include<iostream> using namespace std; int M,K; main() { cin>>M>>K; int y; if(M<=K)y=M-1; else y=M/(K+1)+K; int x=M-1-y; long z=x%2?x/2+1+y:x/2; cout<<(2*z>M-1?"Win":2*z<M-1?"Lose":"Draw")<<endl; }