結果
問題 | No.334 門松ゲーム |
ユーザー | 👑 testestest |
提出日時 | 2016-06-29 21:12:02 |
言語 | C90 (gcc 11.4.0) |
結果 |
AC
|
実行時間 | 4 ms / 2,000 ms |
コード長 | 270 bytes |
コンパイル時間 | 338 ms |
コンパイル使用メモリ | 20,736 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-11 23:31:17 |
合計ジャッジ時間 | 1,251 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 0 ms
5,248 KB |
testcase_01 | AC | 1 ms
5,248 KB |
testcase_02 | AC | 2 ms
5,248 KB |
testcase_03 | AC | 0 ms
5,248 KB |
testcase_04 | AC | 0 ms
5,248 KB |
testcase_05 | AC | 1 ms
5,248 KB |
testcase_06 | AC | 1 ms
5,248 KB |
testcase_07 | AC | 1 ms
5,248 KB |
testcase_08 | AC | 1 ms
5,248 KB |
testcase_09 | AC | 1 ms
5,248 KB |
testcase_10 | AC | 4 ms
5,248 KB |
testcase_11 | AC | 1 ms
5,248 KB |
testcase_12 | AC | 1 ms
5,248 KB |
testcase_13 | AC | 1 ms
5,248 KB |
testcase_14 | AC | 1 ms
5,248 KB |
testcase_15 | AC | 1 ms
5,248 KB |
コンパイルメッセージ
main.c:1:1: warning: data definition has no type or storage class 1 | a[20],I,J,K,n; | ^ main.c:1:1: warning: type defaults to ‘int’ in declaration of ‘a’ [-Wimplicit-int] main.c:1:7: warning: type defaults to ‘int’ in declaration of ‘I’ [-Wimplicit-int] 1 | a[20],I,J,K,n; | ^ main.c:1:9: warning: type defaults to ‘int’ in declaration of ‘J’ [-Wimplicit-int] 1 | a[20],I,J,K,n; | ^ main.c:1:11: warning: type defaults to ‘int’ in declaration of ‘K’ [-Wimplicit-int] 1 | a[20],I,J,K,n; | ^ main.c:1:13: warning: type defaults to ‘int’ in declaration of ‘n’ [-Wimplicit-int] 1 | a[20],I,J,K,n; | ^ main.c:2:1: warning: return type defaults to ‘int’ [-Wimplicit-int] 2 | f(x){ | ^ main.c: In function ‘f’: main.c:2:1: warning: type of ‘x’ defaults to ‘int’ [-Wimplicit-int] main.c: At top level: main.c:8:1: warning: return type defaults to ‘int’ [-Wimplicit-int] 8 | main(){ | ^~~~ main.c: In function ‘main’: main.c:9:15: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration] 9 | for(;~scanf("%d",a+n);n++); | ^~~~~ main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’ +++ |+#include <stdio.h> 1 | a[20],I,J,K,n; main.c:9:15: warning: incompatible implicit declaration of built-in function ‘scanf’ [-Wbuiltin-declaration-mismatch] 9 | for(;~scanf("%d",a+n);n++); | ^~~~~ main.c:9:15: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’ main.c:10:17: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration] 10 | n=f(0)?!printf("%d %d %d",I,J,K):!puts("-1"); | ^~~~~~ main.c:10:17: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ main.c:10:17: warning: incompatible implicit declaration
ソースコード
a[20],I,J,K,n; f(x){ int i=1,j,k; for(;i<n;i++)for(j=i;j<n;j++)for(k=j;k<n;k++)if(~x>>i&~x>>j&~x>>k&(a[i]-a[j])*(a[k]-a[j])>0&&!f(x^1<<i^1<<j^1<<k))return I=--i,J=--j,K=--k; I=0; } main(){ for(;~scanf("%d",a+n);n++); n=f(0)?!printf("%d %d %d",I,J,K):!puts("-1"); }