Borderou de evaluare (job #2245731)
Utilizator | Data | 25 septembrie 2018 19:25:43 | |
---|---|---|---|
Problema | Livada | Status | done |
Runda | Arhiva de probleme | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp:7:60: error: ‘int rand [250001]’ redeclared as different kind of symbol
int m,n,p,sol,maxim,k=1,v[250001],minim=INT_MAX,rand[250001];
^
In file included from /usr/include/c++/6/cstdlib:75:0,
from /usr/include/c++/6/ext/string_conversions.h:41,
from /usr/include/c++/6/bits/basic_string.h:5417,
from /usr/include/c++/6/string:52,
from /usr/include/c++/6/bits/locale_classes.h:40,
from /usr/include/c++/6/bits/ios_base.h:41,
from /usr/include/c++/6/ios:42,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/fstream:38,
from user.cpp:1:
/usr/include/stdlib.h:374:12: note: previous declaration ‘int rand()’
extern int rand (void) __THROW;
^~~~
user.cpp: In function ‘void citire()’:
user.cpp:19:26: warning: pointer to a function used in arithmetic [-Wpointer-arith]
minim=y; rand[1]=y;
^
user.cpp:19:28: error: assignment of read-only location ‘*(rand + 1u)’
minim=y; rand[1]=y;
^
user.cpp:19:28: error: cannot convert ‘int’ to ‘int() throw ()’ in assignment
user.cpp:22:20: warning: pointer to a function used in arithmetic [-Wpointer-arith]
rand[j] = x;
^
user.cpp:22:24: error: assignment of read-only location ‘*(rand + ((sizetype)j))’
rand[j] = x;
^
user.cpp:22:24: error: cannot convert ‘int’ to ‘int() throw ()’ in assignment
user.cpp:33:26: warning: pointer to a function used in arithmetic [-Wpointer-arith]
{v[rand[t] - minim + 1]++;
^
user.cpp:33:30: warning: pointer to a function used in arithmetic [-Wpointer-arith]
{v[rand[t] - minim + 1]++;
^~~~~
user.cpp:33:38: warning: pointer to a function used in arithmetic [-Wpointer-arith]
{v[rand[t] - minim + 1]++;
^
user.cpp:33:39: error: invalid types ‘int [250001][int (*)() throw ()]’ for array subscript
{v[rand[t] - minim + 1]++;
^
user.cpp:34:28: warning: pointer to a function used in arithmetic [-Wpointer-arith]
if(v[rand[t] - minim + 1] >= (n/2)+1)
^
user.cpp:34:32: warning: pointer to a function used in arithmetic [-Wpointer-arith]
if(v[rand[t] - minim + 1] >= (n/2)+1)
^~~~~
user.cpp:34:40: warning: pointer to a function used in arithmetic [-Wpointer-arith]
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !