Borderou de evaluare (job #2671632)

Utilizator DrumeaVDrumea Vasile DrumeaV Data 12 noiembrie 2020 14:40:05
Problema Datorii Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 100

Raport evaluator

Compilare: main.cpp: In function 'void modify(int, int)': main.cpp:3:31: warning: suggest parentheses around arithmetic in operand of '^' [-Wparentheses] #define pow2k(x) (x ^ (x - 1) & x) ~~~~~~~~^~~~~ ~ using namespace std; ~~~~~~~~~~~~~~~~~~~~~ ~ const int MAX_NUMBER = 15123; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~ int N, M; ~~~~~~~~~~ int bit[MAX_NUMBER]; ~~~~~~~~~~~~~~~~~~~~~ ~ void modify(int index, int number) { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (int i = index; i <= N; i += pow2k(i)) { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ main.cpp:13:38: note: in expansion of macro 'pow2k' for (int i = index; i <= N; i += pow2k(i)) { ^~~~~ main.cpp: In function 'int main()': main.cpp:29:38: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result] freopen("datorii.in", "r", stdin); ^ main.cpp:30:40: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result] freopen("datorii.out", "w", stdout); ^ main.cpp:32:27: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result] scanf("%d %d", &N, &M); ^ main.cpp:35:24: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result] scanf("%d", &x); ^ main.cpp:41:41: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result] scanf("%d %d %d", &type, &x, &y); ^
Test Timp executie Memorie folosita Mesaj Punctaj/test
1103ms524kbCorect!20
2103ms655kbCorect!20
3104ms524kbCorect!20
4103ms524kbCorect!20
5106ms524kbCorect!20
Punctaj total100

Ceva nu functioneaza?