結果
| 問題 | No.592 括弧の対応 (2) |
| コンテスト | |
| ユーザー |
%20
|
| 提出日時 | 2017-11-11 18:18:06 |
| 言語 | C(gnu17) (gcc 15.2.0) |
| 結果 |
CE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 147 bytes |
| 記録 | |
| コンパイル時間 | 100 ms |
| コンパイル使用メモリ | 25,140 KB |
| 最終ジャッジ日時 | 2026-02-22 00:30:42 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
コンパイルメッセージ
main.c:1:1: warning: data definition has no type or storage class
1 | s[100000],x[200001],i,j;
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 's' [-Wimplicit-int]
main.c:1:11: error: type defaults to 'int' in declaration of 'x' [-Wimplicit-int]
1 | s[100000],x[200001],i,j;
| ^
main.c:1:21: error: type defaults to 'int' in declaration of 'i' [-Wimplicit-int]
1 | s[100000],x[200001],i,j;
| ^
main.c:1:23: error: type defaults to 'int' in declaration of 'j' [-Wimplicit-int]
1 | s[100000],x[200001],i,j;
| ^
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
2 | main(N){
| ^~~~
main.c: In function 'main':
main.c:2:1: warning: old-style function definition [-Wold-style-definition]
main.c:2:1: error: type of 'N' defaults to 'int' [-Wimplicit-int]
main.c:3:13: error: 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: error: 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>'; this is probably fixable by adding '#include <stdio.h>'
main.c:5:19: error: 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 decl
ソースコード
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);
}
%20