Pagini recente » Borderou de evaluare (job #2989464) | Borderou de evaluare (job #565972) | Borderou de evaluare (job #1165396) | Borderou de evaluare (job #1734789) | Borderou de evaluare (job #2190789)
Borderou de evaluare (job #2190789)
Raport evaluator
Compilare:
user.cpp: In function ‘void aib_add(int, int)’:
user.cpp:2:25: warning: suggest parentheses around arithmetic in operand of ‘^’ [-Wparentheses]
#define zeros(x) x^(x-1)&x
~~~~~^~~
#define Vmax 1000000006
~~~~~~~~~~~~~~~~~~~~~~~~
#define oo (int)-1e9
~~~~~~~~~~~~~~~~~~~~~
using namespace std;
~~~~~~~~~~~~~~~~~~~~~
~
ifstream f("brasov.in");
~~~~~~~~~~~~~~~~~~~~~~~~~
ofstream g("brasov.out");
~~~~~~~~~~~~~~~~~~~~~~~~~~
~
int n,q,a,b,nrM;
~~~~~~~~~~~~~~~~~
string type;
~~~~~~~~~~~~~
map<int,int> AIB;
~~~~~~~~~~~~~~~~~~
~
struct interval{
~~~~~~~~~~~~~~~~~
int a,b;
~~~~~~~~~
bool operator < (const interval &oth) const{
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
return a!=oth.a ? a<oth.a : b<oth.b;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
}
~~
};
~~~
set<interval> S;
~~~~~~~~~~~~~~~~~
multiset<int> D;
~~~~~~~~~~~~~~~~~
map<int,int> LG;
~~~~~~~~~~~~~~~~~
~
void aib_add(int pos,int val){
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
for (int i=pos+3;i<=Vmax;i+=zeros(i)) AIB[i] += val;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Test |
Timp executie |
Memorie folosita |
Mesaj |
Punctaj/test |
Punctaj/grupa |
1 | 1416ms | 3624kb | Incorect | 0 | 0 |
2 | 1224ms | 5284kb | Incorect | 0 |
3 | 1508ms | 6040kb | Incorect | 0 |
4 | 3152ms | 15392kb | OK | 10 |
5 | 1304ms | 9156kb | Incorect | 0 |
6 | 896ms | 6652kb | Incorect | 0 |
7 | 1672ms | 9352kb | Incorect | 0 |
8 | 1328ms | 4756kb | Incorect | 0 |
9 | 2588ms | 25616kb | Incorect | 0 |
10 | 1092ms | 7608kb | OK | 10 |
Punctaj total | 0 |