Borderou de evaluare (job #599353)

Utilizator avatar ionutpop118 Pop Ioan Cristian ionutpop118 IP ascuns
Problemă Skyline (clasa a 7-a) Compilator cpp-32
Rundă Arhiva de probleme Status evaluat
Dată 30 mai 2021 11:54:27 Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'int main()': main.cpp:18:27: error: conflicting declaration 'long long int pos' 18 | long long ans = 0, a, pos = 0; | ^~~ main.cpp:17:12: note: previous declaration as 'int pos' 17 | int n, pos = 0, len, top = 1; | ^~~ main.cpp:29:19: error: 'max' was not declared in this scope 29 | ans = max(ans, a); | ^~~ main.cpp:37:15: error: 'max' was not declared in this scope 37 | ans = max(ans, a); | ^~~ main.cpp:15:12: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result] 15 | freopen("skyline.in", "r", stdin); | ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ main.cpp:16:12: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result] 16 | freopen("skyline.out", "w", stdout); | ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~ main.cpp:20:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result] 20 | scanf("%d", &n); | ~~~~~^~~~~~~~~~ main.cpp:22:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result] 22 | scanf("%d %d", &v[i].h, &len); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~