Submission #22807

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
228072017-04-30 07:36:32AcornCkiGs14004Team (#40)New Ocurrences (KRIII5_NO)C++98
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> pi;
typedef long long lint;
const int MAXN = 100005;
int n;
struct bit{
lint tree[MAXN];
void add(int x, lint v){
x++;
while(x <= n+1){
tree[x] += v;
x += x & -x;
}
}
lint query(int x){
x++;
lint ret = 0;
while(x){
ret += tree[x];
x -= x & -x;
}
return ret;
}
}bl, br;
struct sfxarray{
int ord[MAXN], nord[MAXN], cnt[MAXN], aux[MAXN];
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

NO.cpp: In function 'int main()':
NO.cpp:134:7: warning: 'auto' changes meaning in C++11; please remove it [-Wc++0x-compat]
   for(auto &j : q[i]){
       ^
NO.cpp:134:13: error: ISO C++ forbids declaration of 'j' with no type [-fpermissive]
   for(auto &j : q[i]){
             ^
NO.cpp:134:17: warning: range-based 'for' loops only available with -std=c++11 or -std=gnu++11
   for(auto &j : q[i]){
                 ^
NO.cpp:135:13: error: request for member 'first' in 'j', which is of non-class type 'int'
    bl.add(j.first, j.second);
             ^
NO.cpp:135:22: error: request for member 'second' in 'j', which is of non-class type 'int'
    bl.add(j.first, j.second);
                      ^