Pagini recente » Borderou de evaluare (job #469052) | Borderou de evaluare (job #2725464) | Borderou de evaluare (job #2923298) | Borderou de evaluare (job #2780728) | Borderou de evaluare (job #2749479)
Borderou de evaluare (job #2749479)
Raport evaluator
Compilare:
main.cpp: In function 'void add(int, int, int)':
main.cpp:2:31: warning: suggest parentheses around arithmetic in operand of '^' [-Wparentheses]
#define zero(x) ((x ^ (x - 1) & x))
~~~~~~~~^~~~~~
using namespace std;
~~~~~~~~~~~~~~~~~~~~~
ifstream cin("baruri.in");
~~~~~~~~~~~~~~~~~~~~~~~~~~~
ofstream cout("baruri.out");
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
int aib[3005], v[30005];
~~~~~~~~~~~~~~~~~~~~~~~~~
void add(int x, int cantitate, int n)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
{
~~
int i;
~~~~~~~
for(i = x; i <= n; i += zero(i))
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.cpp:10:29: note: in expansion of macro 'zero'
for(i = x; i <= n; i += zero(i))
^~~~
main.cpp: In function 'int compute(int)':
main.cpp:2:31: warning: suggest parentheses around arithmetic in operand of '^' [-Wparentheses]
#define zero(x) ((x ^ (x - 1) & x))
~~~~~~~~^~~~~~
using namespace std;
~~~~~~~~~~~~~~~~~~~~~
ifstream cin("baruri.in");
~~~~~~~~~~~~~~~~~~~~~~~~~~~
ofstream cout("baruri.out");
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
int aib[3005], v[30005];
~~~~~~~~~~~~~~~~~~~~~~~~~
void add(int x, int cantitate, int n)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
{
~~
int i;
~~~~~~~
for(i = x; i <= n; i += zero(i))
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
aib[i] += cantitate;
~~~~~~~~~~~~~~~~~~~~~
}
~~
int compute(int x)
~~~~~~~~~~~~~~~~~~~
{
Test |
Timp executie |
Memorie folosita |
Mesaj |
Punctaj/test |
1 | 5ms | 131kb | Killed by Signal 11 | 0 |
Punctaj total | 0 |