Borderou de evaluare (job #2227074)
Utilizator | Data | 31 iulie 2018 09:58:36 | |
---|---|---|---|
Problema | Cele mai apropiate puncte din plan | Status | done |
Runda | Arhiva educationala | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp: In function ‘long long unsigned int getmin(int, int)’:
user.cpp:33:40: error: call of overloaded ‘abs(long long unsigned int)’ is ambiguous
if(abs(Y[i].second-X[mid].first)<=minim)
^
In file included from /usr/include/c++/6/cstdlib:75:0,
from /usr/include/c++/6/bits/stl_algo.h:59,
from /usr/include/c++/6/algorithm:62,
from user.cpp:3:
/usr/include/stdlib.h:774:12: note: candidate: int abs(int)
extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
^~~
In file included from /usr/include/c++/6/bits/stl_algo.h:59:0,
from /usr/include/c++/6/algorithm:62,
from user.cpp:3:
/usr/include/c++/6/cstdlib:180:3: note: candidate: long long int std::abs(long long int)
abs(long long __x) { return __builtin_llabs (__x); }
^~~
/usr/include/c++/6/cstdlib:172:3: note: candidate: long int std::abs(long int)
abs(long __i) { return __builtin_labs(__i); }
^~~
user.cpp: In function ‘int main()’:
user.cpp:46:49: warning: format ‘%d’ expects argument of type ‘int*’, but argument 3 has type ‘long long unsigned int*’ [-Wformat=]
fscanf(f,"%d%d",&X[i].first,&X[i].second);
^
user.cpp:46:49: warning: format ‘%d’ expects argument of type ‘int*’, but argument 4 has type ‘long long unsigned int*’ [-Wformat=]
user.cpp:50:40: error: ‘sqrt’ was not declared in this scope
double val=sqrt(double(getmin(0,N)));
^
user.cpp:42:22: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
fscanf(f,"%d",&N);
^
user.cpp:46:50: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
fscanf(f,"%d%d",&X[i].first,&X[i].second);
^
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !