Borderou de evaluare (job #2560977)

Utilizator alex_braslasuBraslasu Alexandru alex_braslasu Data 28 februarie 2020 13:52:42
Problema Subsir crescator maximal Status done
Runda Arhiva educationala Compilator cpp-64 | Vezi sursa
Scor 35

Raport evaluator

Compilare: main.cpp: In function 'void update(int, int)': main.cpp:5:26: warning: suggest parentheses around arithmetic in operand of '^' [-Wparentheses] #define zeros(x) (x^(x-1)&x) ~~~~~^~~~ using namespace std; ~~~~~~~~~~~~~~~~~~~~~ ifstream f("scmax.in"); ~~~~~~~~~~~~~~~~~~~~~~~~ ofstream g("scmax.out"); ~~~~~~~~~~~~~~~~~~~~~~~~~ ~ int n, i, h = 1, v[100010], AIB[100010], lst[100010], D[100010], up[100010], bst; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~ void update(int x, int ind) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~~ for (int i = x; i <= n; i += zeros(i)) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ main.cpp:14:34: note: in expansion of macro 'zeros' for (int i = x; i <= n; i += zeros(i)) ^~~~~ main.cpp: In function 'int query(int)': main.cpp:5:26: warning: suggest parentheses around arithmetic in operand of '^' [-Wparentheses] #define zeros(x) (x^(x-1)&x) ~~~~~^~~~ using namespace std; ~~~~~~~~~~~~~~~~~~~~~ ifstream f("scmax.in"); ~~~~~~~~~~~~~~~~~~~~~~~~ ofstream g("scmax.out"); ~~~~~~~~~~~~~~~~~~~~~~~~~ ~ int n, i, h = 1, v[100010], AIB[100010], lst[100010], D[100010], up[100010], bst; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~ void update(int x, int ind) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~~ for (int i = x; i <= n; i += zeros(i)) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (D[ind] > D[AIB[i]]) ~~~~~~~~~~~~~~~~~~~~~~~~ AIB[i] = ind;
Test Timp executie Memorie folosita Mesaj Punctaj/test Punctaj/grupa
12ms131kbSubsir incorect!55
24ms262kbSubsir incorect!55
33ms131kbSubsir incorect!55
43ms131kbSubsir incorect!55
53ms131kbSubsir incorect!55
63ms131kbSubsir incorect!55
74ms131kbSubsir incorect!55
8107ms2097kbSubsir incorect!50
9303ms1310kbTime limit exceeded0
10104ms2097kbSubsir incorect!5
Punctaj total35

Ceva nu functioneaza?