Borderou de evaluare (job #2600491)

Utilizator MateiAruxandeiMateiStefan MateiAruxandei Data 12 aprilie 2020 18:26:41
Problema PermutariAB Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 100

Raport evaluator

Compilare: main.cpp: In function 'void ADD(int)': main.cpp:4:32: warning: suggest parentheses around arithmetic in operand of '^' [-Wparentheses] #define zerous(x) (x ^ (x - 1) & x) ~~~~~~~~^~~~~ using namespace std; ~~~~~~~~~~~~~~~~~~~~~ ~ ifstream fin("permutariab.in"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ofstream fout("permutariab.out"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~ int n, AIB[NMAX], pz[NMAX], a[NMAX], b[NMAX]; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~ void ADD(int poz){ ~~~~~~~~~~~~~~~~~~~ for(int i = poz; i <= n; i += zerous(i)) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ main.cpp:13:35: note: in expansion of macro 'zerous' for(int i = poz; i <= n; i += zerous(i)) ^~~~~~ main.cpp: In function 'int Query(int)': main.cpp:4:32: warning: suggest parentheses around arithmetic in operand of '^' [-Wparentheses] #define zerous(x) (x ^ (x - 1) & x) ~~~~~~~~^~~~~ using namespace std; ~~~~~~~~~~~~~~~~~~~~~ ~ ifstream fin("permutariab.in"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ofstream fout("permutariab.out"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~ int n, AIB[NMAX], pz[NMAX], a[NMAX], b[NMAX]; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~ void ADD(int poz){ ~~~~~~~~~~~~~~~~~~~ for(int i = poz; i <= n; i += zerous(i)) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ AIB[i]++; ~~~~~~~~~~ }
Test Timp executie Memorie folosita Mesaj Punctaj/test
12ms131kbOK10
22ms131kbOK10
33ms131kbOK10
43ms131kbOK10
53ms131kbOK10
63ms131kbOK10
73ms131kbOK10
8185ms1703kbOK10
9163ms1703kbOK10
10373ms1703kbOK10
Punctaj total100

Ceva nu functioneaza?