Borderou de evaluare (job #2263348)
Utilizator | Data | 18 octombrie 2018 17:08:02 | |
---|---|---|---|
Problema | Copii3 | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:14:18: error: 'int y0 [320002]' redeclared as different kind of symbol
int k0[NM], y0[NM];
^
In file included from /usr/include/features.h:367:0,
from /usr/include/x86_64-linux-gnu/c++/6/bits/os_defines.h:39,
from /usr/include/x86_64-linux-gnu/c++/6/bits/c++config.h:507,
from /usr/include/c++/6/cassert:43,
from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:33,
from main.cpp:1:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:250:1: note: previous declaration 'double y0(double)'
__MATHCALL (y0,, (_Mdouble_));
^
main.cpp:15:18: error: 'int y1 [320002]' redeclared as different kind of symbol
int k1[NM], y1[NM];
^
In file included from /usr/include/features.h:367:0,
from /usr/include/x86_64-linux-gnu/c++/6/bits/os_defines.h:39,
from /usr/include/x86_64-linux-gnu/c++/6/bits/c++config.h:507,
from /usr/include/c++/6/cassert:43,
from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:33,
from main.cpp:1:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:251:1: note: previous declaration 'double y1(double)'
__MATHCALL (y1,, (_Mdouble_));
^
main.cpp: In function 'int a(int, int, int)':
main.cpp:37:34: warning: pointer to a function used in arithmetic [-Wpointer-arith]
return sum1(y1[k1[p1 - 1] + 1], y1[k1[p1 - 1] + d]) - sum0(y0[k0[p1 - 1] - d + 1], y0[k0[p1 - 1]]);
^
main.cpp:37:34: warning: pointer to a function used in arithmetic [-Wpointer-arith]
main.cpp:37:54: warning: pointer to a function used in arithmetic [-Wpointer-arith]
return sum1(y1[k1[p1 - 1] + 1], y1[k1[p1 - 1] + d]) - sum0(y0[k0[p1 - 1] - d + 1], y0[k0[p1 - 1]]);
^
main.cpp:37:34: error: invalid conversion from 'double (*)(double) throw ()' to 'int' [-fpermissive]
return sum1(y1[k1[p1 - 1] + 1], y1[k1[p1 - 1] + d]) - sum0(y0[k0[p1 - 1] - d + 1], y0[k0[p1 - 1]]);
~~~~~~~~~~~~~~~~~^
main.cpp:21:5: note: initializing argument 1 of 'int sum1(int, int)'
int sum1(int p1, int p2)
^~~~
main.cpp:37:54: error: invalid conversion from 'double (*)(double) throw ()' to 'int' [-fpermissive]
return sum1(y1[k1[p1 - 1] + 1], y1[k1[p1 - 1] + d]) - sum0(y0[k0[p1 - 1] - d + 1], y0[k0[p1 - 1]]);
~~~~~~~~~~~~~~~~~^
main.cpp:21:5: note: initializing argument 2 of 'int sum1(int, int)'
int sum1(int p1, int p2)
^~~~
main.cpp:37:85: warning: pointer to a function used in arithmetic [-Wpointer-arith]
return sum1(y1[k1[p1 - 1] + 1], y1[k1[p1 - 1] + d]) - sum0(y0[k0[p1 - 1] - d + 1], y0[k0[p1 - 1]]);
^
main.cpp:37:85: warning: pointer to a function used in arithmetic [-Wpointer-arith]
main.cpp:37:101: warning: pointer to a function used in arithmetic [-Wpointer-arith]
return sum1(y1[k1[p1 - 1] + 1], y1[k1[p1 - 1] + d]) - sum0(y0[k0[p1 - 1] - d + 1], y0[k0[p1 - 1]]);
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !