Borderou de evaluare (job #1499369)

Utilizator theprdvtheprdv theprdv Data 10 octombrie 2015 15:42:00
Problema Desen Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp: In function ‘int main()’: user.cpp:43:30: warning: format ‘%d’ expects argument of type ‘int*’, but argument 2 has type ‘short int*’ [-Wformat=] scanf("%d %d", &x[i], &y[i]); ^ user.cpp:43:30: warning: format ‘%d’ expects argument of type ‘int*’, but argument 3 has type ‘short int*’ [-Wformat=] user.cpp:51:31: error: ‘abs’ was not declared in this scope int sum = ((abs(x[i] - x[j])) * (abs(x[i] - x[j]))) + ((abs(y[i] - y[j])) * (abs(y[i] - y[j]))); ^ user.cpp:52:94: error: ‘sqrt’ was not declared in this scope double cost = x[i] == x[j] ? abs(y[i] - y[j]) : y[i] == y[j] ? abs(x[i] - x[j]) : sqrt(sum); ^ user.cpp:38:35: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] freopen("desen.out", "w", stdout); ^ user.cpp:40:17: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d", &N); ^ user.cpp:43:31: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d %d", &x[i], &y[i]); ^

Ceva nu functioneaza?