/ Vijos /

记录详情

Compile Error

foo.cpp: In function 'void get_Adjacent(char*, int)':
foo.cpp:84:49: error: reference to 'next' is ambiguous
 for(i++;i<len;i++) s[i]='0'; } i=0; if(flag==1) next[i++]='1'; for(;i<len+flag;i++) next[i]=s[i-flag]; next[i]='\0'; } bool judgment(int p,int len) { int i ; if(str[p]!='1') return 0; for(i=1;i<p;i++) if(str[i]!='9') return 0; for(i=1;i+p<=n&&i<len;i++) if(str[i+p]!='0') return 0; return 1; } void getMin(char s[],char t[]) { int i,ls=strlen(s),lt=strlen(t); if(t[0]=='0'||lt>ls)
                                                 ^
foo.cpp:59:53: note: candidates are: char next [210]
 char str[210],minf[210],fir[210],ans[210],temp[210],next[210],ret[210];
                                                     ^
In file included from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algobase.h:66:0,
                 from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\algorithm:61,
                 from foo.cpp:4:
c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_iterator_base_funcs.h:184:5: note:                 template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
     next(_ForwardIterator __x, typename
     ^
foo.cpp:84:85: error: reference to 'next' is ambiguous
 for(i++;i<len;i++) s[i]='0'; } i=0; if(flag==1) next[i++]='1'; for(;i<len+flag;i++) next[i]=s[i-flag]; next[i]='\0'; } bool judgment(int p,int len) { int i ; if(str[p]!='1') return 0; for(i=1;i<p;i++) if(str[i]!='9') return 0; for(i=1;i+p<=n&&i<len;i++) if(str[i+p]!='0') return 0; return 1; } void getMin(char s[],char t[]) { int i,ls=strlen(s),lt=strlen(t); if(t[0]=='0'||lt>ls)
                                                                                     ^
foo.cpp:59:53: note: candidates are: char next [210]
 char str[210],minf[210],fir[210],ans[210],temp[210],next[210],ret[210];
                                                     ^
In file included from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algobase.h:66:0,
                 from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\algorithm:61,
                 from foo.cpp:4:
c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_iterator_base_funcs.h:184:5: note:                 template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
     next(_ForwardIterator __x, typename
     ^
foo.cpp:84:104: error: reference to 'next' is ambiguous
 for(i++;i<len;i++) s[i]='0'; } i=0; if(flag==1) next[i++]='1'; for(;i<len+flag;i++) next[i]=s[i-flag]; next[i]='\0'; } bool judgment(int p,int len) { int i ; if(str[p]!='1') return 0; for(i=1;i<p;i++) if(str[i]!='9') return 0; for(i=1;i+p<=n&&i<len;i++) if(str[i+p]!='0') return 0; return 1; } void getMin(char s[],char t[]) { int i,ls=strlen(s),lt=strlen(t); if(t[0]=='0'||lt>ls)
                                                                                                        ^
foo.cpp:59:53: note: candidates are: char next [210]
 char str[210],minf[210],fir[210],ans[210],temp[210],next[210],ret[210];
                                                     ^
In file included from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algobase.h:66:0,
                 from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\algorithm:61,
                 from foo.cpp:4:
c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_iterator_base_funcs.h:184:5: note:                 template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
     next(_ForwardIterator __x, typename
     ^
foo.cpp: In function 'void find_FirstNumber()':
foo.cpp:89:475: error: reference to 'next' is ambiguous
 if(s[i]<t[i]) return; } strcpy(s,t); ansp=fp; } void find_FirstNumber() { int i,j,k,l,len,cnt; for(i=0;i<208;i++) minf[i]='A'; minf[210-1]='\0'; for(l=1;l<=n;l++) for(len=l,i=2;i<=len+1;i++) { fp=i; if(str[i]=='0') continue; if(n-i+1<len) { if(judgment(i,len+1)) { for(j=0;j<len;j++) fir[j]='9

信息

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