Borderou de evaluare (job #1206124)

Utilizator Kerriganamihut Kerrigan Data 8 iulie 2014 22:23:02
Problema Sume Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp: In function ‘void GenInitSeq(double)’: user.cpp:48:54: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘__gnu_cxx::__alloc_traits<std::allocator<long unsigned int> >::value_type {aka long unsigned int}’ [-Wformat=] for (int i = 0; i < n; ++i) printf("%d ", numInit[i]); ^ user.cpp: In function ‘int main()’: user.cpp:55:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int i = 0; i < N; i++) scanf("%d", &num[i]); ^ user.cpp:55:49: warning: format ‘%d’ expects argument of type ‘int*’, but argument 2 has type ‘__gnu_cxx::__alloc_traits<std::allocator<long unsigned int> >::value_type* {aka long unsigned int*}’ [-Wformat=] for (int i = 0; i < N; i++) scanf("%d", &num[i]); ^ user.cpp:56:32: error: ‘sqrt’ was not declared in this scope double n = (1 + sqrt(1 + 8 * N)) / 2; ^ user.cpp:52:32: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] freopen("sume.in", "r", stdin); ^ user.cpp:53:34: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] freopen("sume.out", "w", stdout); ^ user.cpp:54:17: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d", &N); ^ user.cpp:55:50: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] for (int i = 0; i < N; i++) scanf("%d", &num[i]); ^

Ceva nu functioneaza?