結果
問題 |
No.361 門松ゲーム2
|
ユーザー |
![]() |
提出日時 | 2019-02-26 01:58:55 |
言語 | C (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 404 bytes |
コンパイル時間 | 1,644 ms |
コンパイル使用メモリ | 30,080 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-30 20:06:06 |
合計ジャッジ時間 | 4,030 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 18 WA * 8 RE * 2 |
ソースコード
#include<stdio.h> void run(void){ int l,d; scanf("%d%d",&l,&d); int g[512]={0}; for(int i=5;i<=l;i++){ int u[512]={0}; for(int a=1;a<l;a++){ for(int b=a+1;b<l-a-b;b++){ int c=l-a-b; if(c-a>d) continue; u[g[a]^g[b]^g[c]]=1; } } int k=0; while(u[k]) k++; g[i]=k; } puts(g[l]?"kado":"matsu"); } int main(void){ run(); return 0; }