結果

問題 No.361 門松ゲーム2
ユーザー akakimidoriakakimidori
提出日時 2019-02-26 01:58:55
言語 C
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 404 bytes
コンパイル時間 472 ms
コンパイル使用メモリ 29,320 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-08-29 01:52:21
合計ジャッジ時間 2,468 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 0 ms
4,380 KB
testcase_01 AC 1 ms
4,380 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 0 ms
4,376 KB
testcase_04 AC 0 ms
4,376 KB
testcase_05 AC 0 ms
4,380 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 1 ms
4,376 KB
testcase_09 AC 1 ms
4,376 KB
testcase_10 AC 0 ms
4,376 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 1 ms
4,380 KB
testcase_14 RE -
testcase_15 AC 1 ms
4,380 KB
testcase_16 WA -
testcase_17 AC 8 ms
4,380 KB
testcase_18 AC 2 ms
4,376 KB
testcase_19 WA -
testcase_20 AC 1 ms
4,376 KB
testcase_21 AC 8 ms
4,380 KB
testcase_22 RE -
testcase_23 AC 10 ms
4,376 KB
testcase_24 AC 10 ms
4,376 KB
testcase_25 WA -
testcase_26 AC 9 ms
4,376 KB
testcase_27 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

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