結果

問題 No.361 門松ゲーム2
ユーザー kotatsugamekotatsugame
提出日時 2020-03-04 14:35:01
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 367 bytes
コンパイル時間 677 ms
コンパイル使用メモリ 73,528 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-04-22 01:37:52
合計ジャッジ時間 2,104 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 2 ms
5,376 KB
testcase_02 AC 2 ms
5,376 KB
testcase_03 AC 2 ms
5,376 KB
testcase_04 WA -
testcase_05 AC 2 ms
5,376 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 2 ms
5,376 KB
testcase_09 AC 2 ms
5,376 KB
testcase_10 AC 2 ms
5,376 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 2 ms
5,376 KB
testcase_14 WA -
testcase_15 AC 3 ms
5,376 KB
testcase_16 WA -
testcase_17 AC 15 ms
5,376 KB
testcase_18 AC 8 ms
5,376 KB
testcase_19 WA -
testcase_20 AC 3 ms
5,376 KB
testcase_21 AC 40 ms
5,376 KB
testcase_22 WA -
testcase_23 AC 8 ms
5,376 KB
testcase_24 AC 8 ms
5,376 KB
testcase_25 WA -
testcase_26 AC 17 ms
5,376 KB
testcase_27 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:6:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    6 | main()
      | ^~~~

ソースコード

diff #

#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;
}
0