Borderou de evaluare (job #1506625)
Utilizator | Data | 20 octombrie 2015 20:44:45 | |
---|---|---|---|
Problema | AI | Status | done |
Runda | Arhiva de probleme | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp:4:150: error: ‘int j1’ redeclared as different kind of symbol
int n,tx,ty,s1x,s1y,s2x,s2y,r1x,r1y,r2x,r2y,k,x,y,li,ci,ln,cn,in,sf,dl[]={0,-1,0,1,0},dc[]={0,0,1,0,-1},min11,min12,min21,min22,x1,x2;float a;int i1,j1,Lmax = 0, L,i,j;
^
In file included from /usr/include/features.h:357:0,
from /usr/include/i386-linux-gnu/c++/4.8/bits/os_defines.h:39,
from /usr/include/i386-linux-gnu/c++/4.8/bits/c++config.h:420,
from /usr/include/c++/4.8/cstdio:41,
from user.cpp:1:
/usr/include/i386-linux-gnu/bits/mathcalls.h:240:1: error: previous declaration of ‘double j1(double)’
__MATHCALL (j1,, (_Mdouble_));
^
user.cpp: In function ‘int main()’:
user.cpp:17:44: error: assignment of function ‘double j1(double)’
{for (j = 1; j <= n; j++)if (v[i][j]){j1 = j;while (v[i][j]==-3) j++;L = j - j1;if ( L > Lmax ) Lmax = L;}
^
user.cpp:17:44: error: cannot convert ‘int’ to ‘double(double)throw ()’ in assignment
user.cpp:17:80: error: invalid operands of types ‘int’ and ‘double(double)throw ()’ to binary ‘operator-’
{for (j = 1; j <= n; j++)if (v[i][j]){j1 = j;while (v[i][j]==-3) j++;L = j - j1;if ( L > Lmax ) Lmax = L;}
^
user.cpp:25:43: error: expected primary-expression before ‘)’ token
{if(s1x>tx) for(i=tx+1;i<s1x;i++) {a=ty+()i-tx)*(s1y-ty)/(s1x-tx); if(a==int(a)) if(v[i][int(a)]!=-3) v[i][int(a)]=-1;}
^
user.cpp:25:44: error: expected ‘;’ before ‘i’
{if(s1x>tx) for(i=tx+1;i<s1x;i++) {a=ty+()i-tx)*(s1y-ty)/(s1x-tx); if(a==int(a)) if(v[i][int(a)]!=-3) v[i][int(a)]=-1;}
^
user.cpp:11:28: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
{freopen("ai.in","r",stdin);
^
user.cpp:12:30: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
freopen("ai.out","w",stdout);
^
user.cpp:13:102: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d\n%d %d %d %d %d %d %d %d %d %d\n%d",&n,&tx,&ty,&s1x,&s1y,&s2x,&s2y,&r1x,&r1y,&r2x,&r2y,&k);
^
user.cpp:15:41: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
for(i=1;i<=k;i++) {scanf("%d %d",&x,&y);v[x][y]=-3;}
^
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !