Pagini recente » Cod sursa (job #239678) | Cod sursa (job #334541) | Cod sursa (job #313398) | Cod sursa (job #3215892) | Borderou de evaluare (job #2504703)
Borderou de evaluare (job #2504703)
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 | 8ms | 131kb | OK | 10 |
| 4 | 32ms | 393kb | OK | 10 |
| 5 | 85ms | 552kb | OK | 10 |
| 6 | 144ms | 770kb | OK | 10 |
| 7 | 120ms | 786kb | OK | 10 |
| 8 | 211ms | 987kb | OK | 10 |
| 9 | 185ms | 954kb | OK | 10 |
| 10 | 174ms | 917kb | OK | 10 |
| Punctaj total | 100 |