Borderou de evaluare (job #2321219)

Utilizator Dragne.Andrei11Dragne Andrei Dragne.Andrei11 Data 15 ianuarie 2019 20:35:28
Problema Carnati Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'int sume(int)': main.cpp:12:5: error: expected ',' or ';' before 'int' int s=0; ^~~ main.cpp:15:9: error: 's' was not declared in this scope s=max(s-(v[i].first-v[i-1].first)*c, 0); ^ main.cpp: In function 'int main()': main.cpp:25:38: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result] freopen("carnati.in", "r", stdin); ^ main.cpp:26:40: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result] freopen("carnati.out", "w", stdout); ^ main.cpp:28:26: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result] scanf("%d%d", &n, &c); ^ main.cpp:30:50: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result] scanf("%d %d", &v[i].first, &v[i].second); ^ Non zero exit status: 1

Ceva nu functioneaza?