Pagini recente » Borderou de evaluare (job #479402) | Borderou de evaluare (job #3281941) | Borderou de evaluare (job #2695520) | Borderou de evaluare (job #239633) | Borderou de evaluare (job #2504701)
Borderou de evaluare (job #2504701)
Raport evaluator
Compilare:
main.cpp: In function 'void Add(int, int)':
main.cpp:2:30: warning: suggest parentheses around arithmetic in operand of '^' [-Wparentheses]
#define zero(x) (x ^ (x - 1) & x)
~~~~~~~~^~~~~
#define NMAX 100005
~~~~~~~~~~~~~~~~~~~~
~
using namespace std;
~~~~~~~~~~~~~~~~~~~~~
~
ifstream f ("aib.in");
~~~~~~~~~~~~~~~~~~~~~~~
ofstream g ("aib.out");
~~~~~~~~~~~~~~~~~~~~~~~~
~
int n , m , x , y;
~~~~~~~~~~~~~~~~~~~
short type;
~~~~~~~~~~~~
int a[NMAX];
~~~~~~~~~~~~~
~
void Add(int poz , int value)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
{
~~
for(int i = poz ; i <= n ; i += zero(i))
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.cpp:16:37: note: in expansion of macro 'zero'
for(int i = poz ; i <= n ; i += zero(i))
^~~~
main.cpp: In function 'int Sum(int)':
main.cpp:2:30: warning: suggest parentheses around arithmetic in operand of '^' [-Wparentheses]
#define zero(x) (x ^ (x - 1) & x)
~~~~~~~~^~~~~
#define NMAX 100005
~~~~~~~~~~~~~~~~~~~~
~
using namespace std;
~~~~~~~~~~~~~~~~~~~~~
~
ifstream f ("aib.in");
~~~~~~~~~~~~~~~~~~~~~~~
ofstream g ("aib.out");
Test |
Timp executie |
Memorie folosita |
Mesaj |
Punctaj/test |
1 | 2ms | 131kb | OK | 10 |
2 | 3ms | 131kb | OK | 10 |
3 | 10ms | 131kb | OK | 10 |
4 | 26ms | 393kb | OK | 10 |
5 | 74ms | 524kb | OK | 10 |
6 | 117ms | 786kb | Incorect | 0 |
7 | 114ms | 786kb | Incorect | 0 |
8 | 155ms | 917kb | Incorect | 0 |
9 | 156ms | 1048kb | Incorect | 0 |
10 | 160ms | 946kb | Incorect | 0 |
Punctaj total | 50 |