Borderou de evaluare (job #3157517)

Utilizator poparobertpoparobert poparobert Data 15 octombrie 2023 17:29:28
Problema Arbori indexati binar Status done
Runda Arhiva educationala Compilator cpp-64 | Vezi sursa
Scor 100

Raport evaluator

Compilare: main.cpp: In member function 'void AIB::addval(ll, ll)': main.cpp:11:38: warning: comparison of integer expressions of different signedness: 'll' {aka 'long long int'} and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare] 11 | void addval(ll p,ll val=1){for(;p<v.size();p+=lsb(p))v[p]+=val;} | ~^~~~~~~~~ In member function 'll AIB::ask(ll)', inlined from 'int main()' at main.cpp:55:23: main.cpp:12:32: warning: 'rez' may be used uninitialized [-Wmaybe-uninitialized] 12 | ll ask(ll p){ll rez=0;for(;p;p-=lsb(p))rez+=v[p];return rez;} | ^ main.cpp: In function 'int main()': main.cpp:20:30: note: 'rez' was declared here 20 | ll n,q,c,a,b,i,st,dr,mid,rez; | ^~~
Test Timp executie Memorie folosita Mesaj Punctaj/test
10ms303kbOK10
20ms303kbOK10
31ms303kbOK10
46ms557kbOK10
514ms864kbOK10
619ms1142kbOK10
724ms1359kbOK10
834ms1568kbOK10
934ms1613kbOK10
1034ms1568kbOK10
Punctaj total100

Ceva nu functioneaza?