結果
| 問題 |
No.1579 New Type of Nim
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-07-02 21:57:10 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 277 bytes |
| コンパイル時間 | 432 ms |
| コンパイル使用メモリ | 66,300 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-06-29 11:28:44 |
| 合計ジャッジ時間 | 1,246 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 18 WA * 13 |
ソースコード
#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==0)t--;
if((t/2)%2)puts("Q");
else puts("P");
return 0;
}