結果
問題 | No.291 黒い文字列 |
ユーザー | 👑 testestest |
提出日時 | 2016-10-25 00:04:11 |
言語 | C90 (gcc 11.4.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 575 bytes |
コンパイル時間 | 376 ms |
コンパイル使用メモリ | 22,656 KB |
実行使用メモリ | 47,872 KB |
最終ジャッジ日時 | 2024-05-03 05:54:13 |
合計ジャッジ時間 | 1,786 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 0 ms
5,248 KB |
testcase_01 | WA | - |
testcase_02 | AC | 1 ms
5,376 KB |
testcase_03 | AC | 1 ms
5,376 KB |
testcase_04 | AC | 1 ms
5,376 KB |
testcase_05 | AC | 1 ms
5,376 KB |
testcase_06 | WA | - |
testcase_07 | AC | 1 ms
5,376 KB |
testcase_08 | AC | 2 ms
5,376 KB |
testcase_09 | WA | - |
testcase_10 | AC | 2 ms
5,376 KB |
testcase_11 | AC | 4 ms
5,376 KB |
testcase_12 | AC | 4 ms
5,376 KB |
testcase_13 | WA | - |
testcase_14 | AC | 1 ms
5,376 KB |
testcase_15 | AC | 1 ms
5,376 KB |
testcase_16 | AC | 35 ms
32,128 KB |
testcase_17 | AC | 37 ms
35,328 KB |
testcase_18 | AC | 37 ms
34,560 KB |
testcase_19 | AC | 49 ms
43,520 KB |
testcase_20 | AC | 52 ms
44,928 KB |
testcase_21 | AC | 24 ms
22,144 KB |
testcase_22 | AC | 45 ms
39,808 KB |
testcase_23 | AC | 53 ms
47,872 KB |
testcase_24 | AC | 40 ms
36,608 KB |
testcase_25 | AC | 40 ms
39,680 KB |
testcase_26 | AC | 23 ms
21,632 KB |
testcase_27 | AC | 10 ms
9,600 KB |
testcase_28 | AC | 18 ms
18,432 KB |
testcase_29 | AC | 34 ms
33,664 KB |
コンパイルメッセージ
main.c:4:1: warning: data definition has no type or storage class 4 | dp[110][22][22][22][22]; | ^~ main.c:4:1: warning: type defaults to ‘int’ in declaration of ‘dp’ [-Wimplicit-int] main.c:5:1: warning: data definition has no type or storage class 5 | i,a,b,c,d,ans; | ^ main.c:5:1: warning: type defaults to ‘int’ in declaration of ‘i’ [-Wimplicit-int] main.c:5:3: warning: type defaults to ‘int’ in declaration of ‘a’ [-Wimplicit-int] 5 | i,a,b,c,d,ans; | ^ main.c:5:5: warning: type defaults to ‘int’ in declaration of ‘b’ [-Wimplicit-int] 5 | i,a,b,c,d,ans; | ^ main.c:5:7: warning: type defaults to ‘int’ in declaration of ‘c’ [-Wimplicit-int] 5 | i,a,b,c,d,ans; | ^ main.c:5:9: warning: type defaults to ‘int’ in declaration of ‘d’ [-Wimplicit-int] 5 | i,a,b,c,d,ans; | ^ main.c:5:11: warning: type defaults to ‘int’ in declaration of ‘ans’ [-Wimplicit-int] 5 | i,a,b,c,d,ans; | ^~~ main.c:6:1: warning: return type defaults to ‘int’ [-Wimplicit-int] 6 | main(t){ | ^~~~ main.c: In function ‘main’: main.c:6:1: warning: type of ‘t’ defaults to ‘int’ [-Wimplicit-int] main.c:8:13: warning: implicit declaration of function ‘gets’ [-Wimplicit-function-declaration] 8 | for(gets(s);s[i];i++){ | ^~~~ main.c:18:14: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration] 18 | ans=!printf("%d",ans-1); | ^~~~~~ main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ +++ |+#include <stdio.h> 1 | #define f(i,e)for(i=e+1;i--;) main.c:18:14: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch] 18 | ans=!printf("%d",ans-1); | ^~~~~~ main.c:18:14: note: include ‘<stdio.h>’ or provide a declarati
ソースコード
#define f(i,e)for(i=e+1;i--;) #define max(p,q)(p<(q)?p=q:p) char s[110]; dp[110][22][22][22][22]; i,a,b,c,d,ans; main(t){ *****dp=1; for(gets(s);s[i];i++){ f(a,20)f(b,a)f(c,b)f(d,c)if(t=dp[i][a][b][c][d]){ if(s[i]=='K'||s[i]=='?')max(dp[i+1][a+1][b][c][d],t); if(s[i]=='U'||s[i]=='?')max(dp[i+1][a][b+1][c][d],t); if(s[i]=='R'||s[i]=='?')max(dp[i+1][a][b][c+1][d],t); if(s[i]=='O'||s[i]=='?')max(dp[i+1][a][b][c][d+1],t); if(s[i]=='I'||s[i]=='?')max(ans,max(dp[i+1][a][b][c][d],d<t?0:t+1)); max(dp[i+1][a][b][c][d],t); } } ans=!printf("%d",ans-1); }