/ Vijos /

记录详情

Compile Error

foo.cpp:1:1: error: 'include' does not name a type
 include<iostream> include<cstring> include<cstdio> define MAXN 210
 ^
foo.cpp:3:10: error: 'MAXN' was not declared in this scope
 char str[MAXN], minf[MAXN], fir[MAXN], ans[MAXN], temp[MAXN], next[MAXN], ret[MAXN] ;
          ^
foo.cpp:3:22: error: 'MAXN' was not declared in this scope
 char str[MAXN], minf[MAXN], fir[MAXN], ans[MAXN], temp[MAXN], next[MAXN], ret[MAXN] ;
                      ^
foo.cpp:3:33: error: 'MAXN' was not declared in this scope
 char str[MAXN], minf[MAXN], fir[MAXN], ans[MAXN], temp[MAXN], next[MAXN], ret[MAXN] ;
                                 ^
foo.cpp:3:44: error: 'MAXN' was not declared in this scope
 char str[MAXN], minf[MAXN], fir[MAXN], ans[MAXN], temp[MAXN], next[MAXN], ret[MAXN] ;
                                            ^
foo.cpp:3:56: error: 'MAXN' was not declared in this scope
 char str[MAXN], minf[MAXN], fir[MAXN], ans[MAXN], temp[MAXN], next[MAXN], ret[MAXN] ;
                                                        ^
foo.cpp:3:68: error: 'MAXN' was not declared in this scope
 char str[MAXN], minf[MAXN], fir[MAXN], ans[MAXN], temp[MAXN], next[MAXN], ret[MAXN] ;
                                                                    ^
foo.cpp:3:79: error: 'MAXN' was not declared in this scope
 char str[MAXN], minf[MAXN], fir[MAXN], ans[MAXN], temp[MAXN], next[MAXN], ret[MAXN] ;
                                                                               ^
foo.cpp: In function 'void get_Adjacent(char*, int)':
foo.cpp:11:8: error: 'MAXN' was not declared in this scope
 char s[MAXN] ;
        ^
foo.cpp:12:33: error: 'strlen' was not declared in this scope
 int i, flag = 0 , len = strlen(t) ;
                                 ^
foo.cpp:13:30: error: 's' was not declared in this scope
 for(i = 0 ; i <= len ; i ++) s[i] = t[i] ;
                              ^
foo.cpp:16:27: error: 's' was not declared in this scope
 for(i = len-1 ; i >= 0 && s[i] == '0' ; i --) ;
                           ^
foo.cpp:17:12: error: 's' was not declared in this scope
 if(i >= 0) s[i] -- ;
            ^
foo.cpp:18:15: error: 's' was not declared in this scope
 if(len > 1 && s[0] == '0') flag = -1 ;
               ^
foo.cpp:19:29: error: 's' was not declared in this scope
 for(i=i+1 ; i < len ; i ++) s[i] = '9' ;
                             ^
foo.cpp:23:27: error: 's' was not declared in this scope
 for(i = len-1 ; i >= 0 && s[i] == '9' ; i --) ;
                           ^
foo.cpp:24:12: error: 's' was not declared in this scope
 if(i >= 0) s[i] ++ ;
            ^
foo.cpp:26:32: error: 's' was not declared in this scope
 for(i = i + 1; i < len ; i ++) s[i] = '0' ;
                                ^
foo.cpp:29:15: error: 'next' was not declared in this scope
 if(flag == 1) next[i++] = '1' ;
               ^
foo.cpp:30:28: error: 'next' was not declared in this scope
 for(; i < len+flag ; i ++) next[i] = s[i-flag] ; next[i] = '\0' ;
                            ^
foo.cpp:30:38: error: 's' was not declared in this scope
 for(; i < len+flag ; i ++) next[i] = s[i-flag] ; next[i] = '\0' ;
                                      ^
foo.cpp:30:50: error: 'next' was not declared in this scope
 for(; i < len+flag ; i ++) next[i] = s[i-flag] ; next[i] = '\0' ;
                                                  ^
foo.cpp: In function 'bool judgment(int, int)':
foo.cpp:35:4: error: 'str' was not declared in this scope
 if(str[p] != '1') return false ;
    ^
foo.cpp:37:4: error: 'str' was not declared in this scope
 if(str[i] != '9') return false ;
    ^
foo.cpp:38:20: error: 'n' was not declared in this scope
 for(i = 1 ; i+p <= n && i < len ; i ++)
                    ^
foo.cpp:39:4: error: 'str' was not declared in this scope
 if(str[i+p] != '0') return false ;
    ^
foo.cpp: In function 'void getMin(char*, char*)':
foo.cpp:44:21: error: 'strlen' was not declared in this scope
 int i, ls = strlen(s), lt = strlen(t) ;
                     ^
foo.cpp:45:19: error: 'lt' was not declared in thi

信息

递交者
类型
递交
题目
P1005 超长数字串
语言
C++
递交时间
2015-07-29 11:34:16
评测时间
2015-07-29 11:34:42
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes