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