結果
問題 | No.592 括弧の対応 (2) |
ユーザー | %20 |
提出日時 | 2017-11-11 18:18:06 |
言語 | C (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 20 ms / 5,000 ms |
コード長 | 147 bytes |
コンパイル時間 | 766 ms |
コンパイル使用メモリ | 27,520 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-24 19:22:22 |
合計ジャッジ時間 | 1,643 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
5,248 KB |
testcase_01 | AC | 20 ms
5,248 KB |
testcase_02 | AC | 19 ms
5,248 KB |
testcase_03 | AC | 19 ms
5,248 KB |
コンパイルメッセージ
main.c:1:1: warning: data definition has no type or storage class 1 | s[100000],x[200001],i,j; | ^ main.c:1:1: warning: type defaults to 'int' in declaration of 's' [-Wimplicit-int] main.c:1:11: warning: type defaults to 'int' in declaration of 'x' [-Wimplicit-int] 1 | s[100000],x[200001],i,j; | ^ main.c:1:21: warning: type defaults to 'int' in declaration of 'i' [-Wimplicit-int] 1 | s[100000],x[200001],i,j; | ^ main.c:1:23: warning: type defaults to 'int' in declaration of 'j' [-Wimplicit-int] 1 | s[100000],x[200001],i,j; | ^ main.c:2:1: warning: return type defaults to 'int' [-Wimplicit-int] 2 | main(N){ | ^~~~ main.c: In function 'main': main.c:2:1: warning: type of 'N' defaults to 'int' [-Wimplicit-int] main.c:3:13: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 3 | for(scanf("%d%*c",&N);i<N;++i) | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | s[100000],x[200001],i,j; main.c:3:13: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 3 | for(scanf("%d%*c",&N);i<N;++i) | ^~~~~ main.c:3:13: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:4:17: warning: implicit declaration of function 'getchar' [-Wimplicit-function-declaration] 4 | getchar()&1?x[x[i]=s[--j]]=i:(s[j++]=i); | ^~~~~~~ main.c:4:17: note: 'getchar' is defined in header '<stdio.h>'; did you forget to '#include <stdio.h>'? main.c:5:19: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 5 | for(;j<N;)printf("%d\n",x[j++]+1); | ^~~~~~ main.c:5:19: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:5:19: warning: incompatible implicit declaratio
ソースコード
s[100000],x[200001],i,j; main(N){ for(scanf("%d%*c",&N);i<N;++i) getchar()&1?x[x[i]=s[--j]]=i:(s[j++]=i); for(;j<N;)printf("%d\n",x[j++]+1); }