编号 | 题目 | 状态 | 分数 | 总时间 | 内存 | 代码 / 答案文件 | 提交者 | 提交时间 |
---|---|---|---|---|---|---|---|---|
#3532 | #1006. 超级强迫症 | Compile Error | 0 | 0 ms | 0 K | C / 513 B | s230026068 | 2023-11-25 15:34:45 |
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
int
编译信息
/sandbox/1/a.c:9:28: error: use of undeclared identifier 'n'
int *length= (int*)malloc(n*sizeof(int));
^
/sandbox/1/a.c:10:17: error: use of undeclared identifier 'n'
for(int i=0; i<n;i++)
^
/sandbox/1/a.c:14:9: error: expected identifier or '('
for(int=1;i<n;i++){
^
/sandbox/1/a.c:14:12: error: expected ';' in 'for' statement specifier
for(int=1;i<n;i++){
^
/sandbox/1/a.c:14:12: error: use of undeclared identifier 'i'
/sandbox/1/a.c:14:14: error: use of undeclared identifier 'n'
for(int=1;i<n;i++){
^
/sandbox/1/a.c:14:16: error: use of undeclared identifier 'i'
for(int=1;i<n;i++){
^
/sandbox/1/a.c:15:13: error: use of undeclared identifier 'i'
if(length[i]!=length[i+1]){
^
/sandbox/1/a.c:15:24: error: use of undeclared identifier 'i'
if(length[i]!=length[i+1]){
^
/sandbox/1/a.c:21:9: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
if(flag=1){
~~~~^~
/sandbox/1/a.c:21:9: note: place parentheses around the assignment to silence this warning
if(flag=1){
^
( )
/sandbox/1/a.c:21:9: note: use '==' to turn this assignment into an equality comparison
if(flag=1){
^
==
1 warning and 9 errors generated.