結果
問題 |
No.1579 New Type of Nim
|
ユーザー |
|
提出日時 | 2021-07-02 21:56:52 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 274 bytes |
コンパイル時間 | 434 ms |
コンパイル使用メモリ | 66,324 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-29 11:28:42 |
合計ジャッジ時間 | 1,223 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 24 WA * 7 |
ソースコード
#include<iostream> #include<cstring> #include<algorithm> using namespace std; typedef long long LL; const LL mod=1e9+7; int main(){ LL n,m; cin>>n>>m; if(n>m){ n=m+1; } if(m>n){ m=n+1; } int t=n+m; if(t%2)t--; if((t/2)%2)puts("Q"); else puts("P"); return 0; }