Pagini recente » Borderou de evaluare (job #1391666) | Borderou de evaluare (job #406258) | Borderou de evaluare (job #2375856) | Borderou de evaluare (job #1813278) | Borderou de evaluare (job #2930921)
Borderou de evaluare (job #2930921)
Raport evaluator
Compilare:
main.cpp: In function 'void update(int, int)':
main.cpp:5:32: warning: suggest parentheses around arithmetic in operand of '^' [-Wparentheses]
5 | #define zeros(x) ((x ^ (x - 1) & x))
| ~~~~~~~~^~~~~
6 |
|
7 | using namespace std;
| ~~~~~~~~~~~~~~~~~~~~
8 | ifstream f("aib.in");
| ~~~~~~~~~~~~~~~~~~~~~
9 | ofstream g("aib.out");
| ~~~~~~~~~~~~~~~~~~~~~~
10 | int n, m;
| ~~~~~~~~~
11 | int aib[N];
| ~~~~~~~~~~~
12 |
|
13 | void update(int value, int position) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
14 | for(int i = position;i <= n;i += zeros(i)) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.cpp:14:36: note: in expansion of macro 'zeros'
14 | for(int i = position;i <= n;i += zeros(i)) {
| ^~~~~
main.cpp: In function 'int query(int)':
main.cpp:5:32: warning: suggest parentheses around arithmetic in operand of '^' [-Wparentheses]
5 | #define zeros(x) ((x ^ (x - 1) & x))
| ~~~~~~~~^~~~~
6 |
|
7 | using namespace std;
| ~~~~~~~~~~~~~~~~~~~~
8 | ifstream f("aib.in");
| ~~~~~~~~~~~~~~~~~~~~~
9 | ofstream g("aib.out");
| ~~~~~~~~~~~~~~~~~~~~~~
10 | int n, m;
| ~~~~~~~~~
11 | int aib[N];
| ~~~~~~~~~~~
12 |
|
13 | void update(int value, int position) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
14 | for(int i = position;i <= n;i += zeros(i)) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 | aib[i] += value;
| ~~~~~~~~~~~~~~~~
16 | }
Test |
Timp executie |
Memorie folosita |
Mesaj |
Punctaj/test |
1 | 0ms | 184kb | OK | 10 |
2 | 1ms | 184kb | OK | 10 |
3 | 0ms | 184kb | OK | 10 |
4 | 9ms | 442kb | OK | 10 |
5 | 24ms | 606kb | OK | 10 |
6 | 38ms | 827kb | OK | 10 |
7 | 42ms | 888kb | OK | 10 |
8 | 57ms | 1069kb | OK | 10 |
9 | 58ms | 1028kb | OK | 10 |
10 | 57ms | 1024kb | OK | 10 |
Punctaj total | 100 |