結果
| 問題 |
No.361 門松ゲーム2
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-03-04 14:35:01 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 367 bytes |
| コンパイル時間 | 582 ms |
| コンパイル使用メモリ | 72,704 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-14 00:14:35 |
| 合計ジャッジ時間 | 2,024 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 16 WA * 12 |
コンパイルメッセージ
main.cpp:6:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
6 | main()
| ^~~~
ソースコード
#include<iostream>
#include<set>
using namespace std;
int gr[501];
int D,L;
main()
{
cin>>L>>D;
for(int i=1;i<=L;i++)
{
set<int>S;
for(int l1=1;l1*3<i;l1++)for(int l2=l1+1;l1+l2+l2<i;l2++)
{
int l3=i-l1-l2;
if(l3-l1<=D)
{
S.insert(gr[l1]^gr[l2]^gr[l3]);
}
}
while(S.find(gr[i])!=S.end())gr[i]++;
}
cout<<(gr[L]?"Kado":"matsu")<<endl;
}