結果
問題 | No.429 CupShuffle |
ユーザー | testestest |
提出日時 | 2016-12-04 10:09:05 |
言語 | C90 (gcc 11.4.0) |
結果 |
AC
|
実行時間 | 32 ms / 2,000 ms |
コード長 | 287 bytes |
コンパイル時間 | 82 ms |
コンパイル使用メモリ | 20,480 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-05-05 19:15:58 |
合計ジャッジ時間 | 846 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
5,248 KB |
testcase_01 | AC | 0 ms
5,376 KB |
testcase_02 | AC | 1 ms
5,376 KB |
testcase_03 | AC | 0 ms
5,376 KB |
testcase_04 | AC | 1 ms
5,376 KB |
testcase_05 | AC | 1 ms
5,376 KB |
testcase_06 | AC | 0 ms
5,376 KB |
testcase_07 | AC | 1 ms
5,376 KB |
testcase_08 | AC | 0 ms
5,376 KB |
testcase_09 | AC | 1 ms
5,376 KB |
testcase_10 | AC | 4 ms
5,376 KB |
testcase_11 | AC | 32 ms
5,376 KB |
testcase_12 | AC | 30 ms
5,376 KB |
testcase_13 | AC | 29 ms
5,376 KB |
testcase_14 | AC | 30 ms
5,376 KB |
testcase_15 | AC | 0 ms
5,376 KB |
コンパイルメッセージ
main.c:1:1: warning: data definition has no type or storage class 1 | i,j,a,b,p[1<<17],q[1<<17]; | ^ main.c:1:1: warning: type defaults to ‘int’ in declaration of ‘i’ [-Wimplicit-int] main.c:1:3: warning: type defaults to ‘int’ in declaration of ‘j’ [-Wimplicit-int] 1 | i,j,a,b,p[1<<17],q[1<<17]; | ^ main.c:1:5: warning: type defaults to ‘int’ in declaration of ‘a’ [-Wimplicit-int] 1 | i,j,a,b,p[1<<17],q[1<<17]; | ^ main.c:1:7: warning: type defaults to ‘int’ in declaration of ‘b’ [-Wimplicit-int] 1 | i,j,a,b,p[1<<17],q[1<<17]; | ^ main.c:1:9: warning: type defaults to ‘int’ in declaration of ‘p’ [-Wimplicit-int] 1 | i,j,a,b,p[1<<17],q[1<<17]; | ^ main.c:1:18: warning: type defaults to ‘int’ in declaration of ‘q’ [-Wimplicit-int] 1 | i,j,a,b,p[1<<17],q[1<<17]; | ^ main.c:2:1: warning: return type defaults to ‘int’ [-Wimplicit-int] 2 | main(n,k,x,y,z){ | ^~~~ main.c: In function ‘main’: main.c:2:1: warning: type of ‘n’ defaults to ‘int’ [-Wimplicit-int] main.c:2:1: warning: type of ‘k’ defaults to ‘int’ [-Wimplicit-int] main.c:2:1: warning: type of ‘x’ defaults to ‘int’ [-Wimplicit-int] main.c:2:1: warning: type of ‘y’ defaults to ‘int’ [-Wimplicit-int] main.c:2:1: warning: type of ‘z’ defaults to ‘int’ [-Wimplicit-int] main.c:3:13: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration] 3 | for(scanf("%d%d%d ",&n,&k,&x);n/++i;)p[i]=q[i]=i; | ^~~~~ main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’ +++ |+#include <stdio.h> 1 | i,j,a,b,p[1<<17],q[1<<17]; main.c:3:13: warning: incompatible implicit declaration of built-in function ‘scanf’ [-Wbuiltin-declaration-mismatch] 3 | for(scanf("%d%d%d ",&n,&k,&x);n/++i;)p[i]=q[i]=i; | ^~~~~ main.c:
ソースコード
i,j,a,b,p[1<<17],q[1<<17]; main(n,k,x,y,z){ for(scanf("%d%d%d ",&n,&k,&x);n/++i;)p[i]=q[i]=i; for(;k--;)--x?scanf("%d%d ",&y,&z),x>0?p[y]^=p[z]^=p[y]^=p[z]:(q[y]^=q[z]^=q[y]^=q[z]):gets(&y); for(;n/++j;x-p[q[j]]?*(a?&b:&a)=q[j]:0)scanf("%d",&x); a=!printf("%d %d",a<b?a:b,a<b?b:a); }