Pagini recente » Borderou de evaluare (job #291542) | Borderou de evaluare (job #924313) | Borderou de evaluare (job #2083891) | Borderou de evaluare (job #1205445) | Borderou de evaluare (job #2749484)
Borderou de evaluare (job #2749484)
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[30005], 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[30005], 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 | 15ms | 262kb | Killed by Signal 11 | 0 |
Punctaj total | 0 |