QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#220310#5093. 会议hos_lyric100 ✓39ms9036kbC++148.3kb2023-10-20 06:55:532023-10-20 06:55:53

Judging History

你现在查看的是最新测评结果

  • [2023-10-20 06:55:53]
  • 评测
  • 测评结果:100
  • 用时:39ms
  • 内存:9036kb
  • [2023-10-20 06:55:53]
  • 提交

answer

#include "majority.h"

#include <cassert>
#include <cmath>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <functional>
#include <iostream>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>

using namespace std;

namespace {
using Int = long long;

template <class T1, class T2> ostream &operator<<(ostream &os, const pair<T1, T2> &a) { return os << "(" << a.first << ", " << a.second << ")"; };
template <class T> ostream &operator<<(ostream &os, const vector<T> &as) { const int sz = as.size(); os << "["; for (int i = 0; i < sz; ++i) { if (i >= 256) { os << ", ..."; break; } if (i > 0) { os << ", "; } os << as[i]; } return os << "]"; }
template <class T> void pv(T a, T b) { for (T i = a; i != b; ++i) cerr << *i << " "; cerr << endl; }
template <class T> bool chmin(T &t, const T &f) { if (t > f) { t = f; return true; } return false; }
template <class T> bool chmax(T &t, const T &f) { if (t < f) { t = f; return true; } return false; }
#define COLOR(s) ("\x1b[" s "m")

template <class T> struct SplaySimple {
  SplaySimple *p, *l, *r;
  T t;
  SplaySimple() : p(nullptr), l(nullptr), r(nullptr), t() {}
  void rotate() {
    if (p->l == this) { if (r) { r->p = p; } p->l = r; r = p; }
    else              { if (l) { l->p = p; } p->r = l; l = p; }
    SplaySimple *pp = p->p;
    if (pp) ((pp->l == p) ? pp->l : pp->r) = this;
    p->p = this; p = pp;
  }
  SplaySimple *splay() {
    for (; p; rotate()) if (p->p) ((p->l == this) == (p->p->l == p)) ? p->rotate() : rotate();
    return this;
  }
  SplaySimple *linkL(SplaySimple *a) { assert(!l); l = a; if (l) { l->p = this; } return this; }
  SplaySimple *linkR(SplaySimple *a) { assert(!r); r = a; if (r) { r->p = this; } return this; }
  SplaySimple *cutL() { if (l) { l->p = nullptr; l = nullptr; } return this; }
  SplaySimple *cutR() { if (r) { r->p = nullptr; r = nullptr; } return this; }
  SplaySimple *leftmost() {
    SplaySimple *a = this;
    for (; a->l; a = a->l) {}
    return a->splay();
  }
  SplaySimple *rightmost() {
    SplaySimple *a = this;
    for (; a->r; a = a->r) {}
    return a->splay();
  }
  template <class F> void dfs(F f) {
    if (l) l->dfs(f);
    f(this);
    if (r) r->dfs(f);
  }
  friend SplaySimple *concat(SplaySimple *a, SplaySimple *b) {
    if (!a) return b;
    if (!b) return a;
    return a->splay()->rightmost()->linkR(b->splay());
  }
};

////////////////////////////////////////////////////////////////////////////////

struct Node;
using Tree = SplaySimple<Node>;
struct Node {
  Tree *l1, *r1;
  D_t val;
  Node() : l1(nullptr), r1(nullptr), val(-1) {}
};

int Q = 0;
Tree nodes[100'010];

// path: pointer to the rightmost node on the path
// rems: pointer to the root of the tree for the remaining nodes
Tree *path = nullptr, *rems = nullptr;

bool answer() {
/*
vector<Tree *>as;
for(Tree*a=path;a;a=a->t.l1)as.push_back(a);
reverse(as.begin(),as.end());
cerr<<"path = ";for(Tree*a:as)cerr<<make_pair(a-nodes,a->t.val.get_value())<<" ";cerr<<endl;
cerr<<"rems = ";if(rems)rems->dfs([&](Tree*a)->void{cerr<<make_pair(a-nodes,a->t.val.get_value())<<" ";});cerr<<endl;
for(int q=1;q<=Q;++q)if(!nodes[q].p&&(nodes[q].l||nodes[q].r)){
 cerr<<"  chain ";nodes[q].dfs([&](Tree*a)->void{cerr<<make_pair(a-nodes,a->t.val.get_value())<<" ";});cerr<<endl;
}
for(int q=1;q<=Q;++q)if(nodes[q].t.l1)assert(nodes[q].t.l1->t.r1==&nodes[q]);
for(int q=1;q<=Q;++q)if(nodes[q].t.r1)assert(nodes[q].t.r1->t.l1==&nodes[q]);
for(int q=1;q<=Q;++q)if(nodes[q].p)assert(nodes[q].p->l==&nodes[q]||nodes[q].p->r==&nodes[q]);
for(int q=1;q<=Q;++q)if(nodes[q].l)assert(nodes[q].l->p==&nodes[q]);
for(int q=1;q<=Q;++q)if(nodes[q].r)assert(nodes[q].r->p==&nodes[q]);
//*/
  if (path) {
    if (!path->splay()->leftmost()->t.l1) {
      submit(path->t.val);
      return true;
    } else {
      assert(!rems);
      return false;
    }
  } else {
    assert(!rems);
    return false;
  }
}

void insertBetw(Tree *l, Tree *r, Tree *a) {
  if (l) l->t.r1 = a;
  a->t.l1 = l;
  a->t.r1 = r;
  if (r) r->t.l1 = a;
}
void checkL2(Tree *a, bool ask) {
  if (!ask || (a->t.l1 && a->t.l1->t.l1 && a->t.l1->t.l1->t.val == a->t.val)) {
    concat(a->t.l1->t.l1, a);
  }
}
void checkR2(Tree *a, bool ask) {
  if (!ask || (a->t.r1 && a->t.r1->t.r1 && a->t.val == a->t.r1->t.r1->t.val)) {
    concat(a, a->t.r1->t.r1);
  }
}
}  // namespace

bool insert(const D_t &val) {
  Tree *a = &nodes[++Q];
  a->t.val = val;
// cerr<<COLOR("33")<<"insert "<<make_pair(a-nodes,a->t.val.get_value())<<COLOR()<<endl;
  if (path) {
    if (path->t.val == a->t.val) {
// cerr<<COLOR("32")<<"Case "<<__LINE__<<COLOR()<<endl;
      Tree *b = path->splay()->leftmost();
      if (b->t.l1) {
        insertBetw(b->t.l1->t.l1, b->t.l1, a);
        a->t.r1->splay()->cutL();
        checkL2(a, true);
        checkR2(a, false);
      } else {
        rems = concat(rems, a);
      }
    } else {
// cerr<<COLOR("32")<<"Case "<<__LINE__<<COLOR()<<endl;
      path->t.r1 = a;
      a->t.l1 = path;
      checkL2(a, true);
      path = a;
      if (rems) {
        Tree *b = rems;
        {
          Tree *l = b->l, *r = b->r;
          b->cutL()->cutR();
          rems = concat(l, r);
        }
        path->t.r1 = b;
        b->t.l1 = path;
        concat(path->t.l1, b);
        path = b;
      }
    }
  } else {
// cerr<<COLOR("32")<<"Case "<<__LINE__<<COLOR()<<endl;
    path = a;
  }
  return answer();
}

bool erase(int id) {
  Tree *a = &nodes[id];
// cerr<<COLOR("33")<<"erase "<<make_pair(a-nodes,a->t.val.get_value())<<COLOR()<<endl;
  if (!a->t.l1 && !a->t.r1 && a != path) {
// cerr<<COLOR("32")<<"Case "<<__LINE__<<COLOR()<<endl;
    a->splay();
    Tree *l = a->l, *r = a->r;
    a->cutL()->cutR();
    rems = concat(l, r);
  } else {
    if (rems && !a->splay()->leftmost()->t.l1) {
// cerr<<COLOR("32")<<"Case "<<__LINE__<<COLOR()<<endl;
      Tree *b = rems;
      {
        Tree *l = b->l, *r = b->r;
        b->cutL()->cutR();
        rems = concat(l, r);
      }
      if (a->t.l1) a->t.l1->t.r1 = b;
      if (a->t.r1) a->t.r1->t.l1 = b;
      b->t.l1 = a->t.l1;
      b->t.r1 = a->t.r1;
      {
        a->splay();
        Tree *l = a->l, *r = a->r;
        a->cutL()->cutR();
        b->linkL(l)->linkR(r);
      }
      if (!b->t.r1) path = b;
    } else {
      Tree *b = a->t.l1;
      Tree *c = a->t.r1;
      if (b && c && b->splay()->r) {
        Tree *d = b->splay()->leftmost();
        Tree *e = c->splay()->rightmost();
        if (b->t.l1) b->t.l1->t.r1 = c;
        c->t.l1 = b->t.l1;
        {
          a->splay();
          Tree *l = a->l, *r = a->r;
          a->cutL()->cutR();
          concat(l, r);
        }
        {
          b->splay();
          Tree *l = b->l, *r = b->r;
          b->cutL()->cutR();
          concat(l, r);
        }
        {
          Tree *f = c->t.r1;
          if (f && !f->splay()->l) {
            checkL2(f, true);
          }
        }
        if (d->t.l1) {
// cerr<<COLOR("32")<<"Case "<<__LINE__<<COLOR()<<endl;
          insertBetw(d->t.l1->t.l1, d->t.l1, b);
          b->t.r1->splay()->cutL();
          checkL2(b, true);
          checkR2(b, false);
        } else if (e->t.r1) {
// cerr<<COLOR("32")<<"Case "<<__LINE__<<COLOR()<<endl;
          insertBetw(e->t.r1, e->t.r1->t.r1, b);
          b->t.l1->splay()->cutR();
          checkL2(b, false);
          checkR2(b, true);
          if (!b->t.r1) path = b;
        } else {
// cerr<<COLOR("32")<<"Case "<<__LINE__<<COLOR()<<endl;
          rems = concat(rems, b);
          b->t.l1 = b->t.r1 = nullptr;
        }
      } else {
// cerr<<COLOR("32")<<"Case "<<__LINE__<<COLOR()<<endl;
        a->splay()->cutL()->cutR();
        if (b) b->t.r1 = c;
        if (c) c->t.l1 = b;
        if (b && c) {
          if (b->t.l1 && b->t.l1->t.val == c->t.val) concat(b->t.l1, c);
          if (c->t.r1 && b->t.val == c->t.r1->t.val) concat(b, c->t.r1);
        }
        if (!c) path = b;
      }
    }
  }
  a->t.l1 = a->t.r1 = nullptr;
  return answer();
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 2
Accepted

Test #1:

score: 2
Accepted
time: 0ms
memory: 8372kb

input:

1
100
0 4
0 4
0 1
1 1
0 2
0 2
1 3
1 2
0 2
1 5
0 2
0 3
0 3
0 4
1 8
1 9
1 6
0 1
0 2
0 1
1 11
1 12
0 2
1 13
1 14
1 4
0 2
1 15
0 3
1 16
0 4
0 2
0 2
1 17
1 19
1 7
0 3
1 20
0 4
1 21
0 4
1 22
0 1
0 3
1 23
1 24
0 3
1 25
0 1
0 4
1 26
1 27
0 4
0 1
1 29
1 28
0 4
1 30
0 1
0 3
0 4
0 4
0 3
0 2
1 34
0 4
0 4
0 3
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 4
1 4
1 4
0 -1
0 -1
0 -1
1 2
1 2
1 2
1 2
1 2
1 2
1 2
0 -1
1 2
1 2
1 2
0 -1
1 2
0 -1
1 2
0 -1
1 2
1 2
1 2
0 -1
1 2
0 -1
0 -1
0 -1
1 4
0 -1
1 2
1 2
1 2
0 -1
0 -1
0 -1
1 4
0 -1
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
0 ...

result:

ok both questions correct

Test #2:

score: 2
Accepted
time: 0ms
memory: 8440kb

input:

1
100
0 1
0 1
0 1
0 2
1 3
0 1
0 1
1 5
0 2
0 2
0 2
1 9
0 1
1 1
0 2
0 2
1 11
1 10
1 12
1 8
1 4
1 6
0 2
1 13
0 1
1 14
0 2
1 15
0 1
0 2
1 16
0 1
0 2
1 19
1 18
0 1
1 20
1 17
0 1
1 21
0 1
0 2
1 22
1 2
0 1
1 24
0 2
1 25
0 2
1 26
0 1
0 2
0 1
1 29
1 28
1 27
0 2
1 30
0 1
1 31
0 1
1 32
0 1
1 33
0 2
0 1
1 35
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
0 -1
1 2
0 -1
1 1
0 -1
1 2
1 2
1 2
1 2
1 2
0 -1
1 1
0 -1
1 2
0 -1
1 1
0 -1
1 2
0 -1
1 1
0 -1
1 2
0 -1
1 2
0 -1
1 2
0 -1
1 2
0 -1
1 1
0 -1
1 1
0 -1
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
...

result:

ok both questions correct

Test #3:

score: 2
Accepted
time: 2ms
memory: 8432kb

input:

1
100
0 3
0 2
0 3
1 2
0 1
0 2
0 1
0 1
1 7
1 3
0 2
1 8
1 4
0 1
1 9
1 5
0 2
0 1
0 1
0 3
0 4
0 4
1 15
1 10
0 3
0 3
1 17
1 16
0 1
0 3
1 18
1 13
0 1
1 20
0 3
1 21
1 12
0 2
0 2
1 23
0 2
0 3
0 2
1 24
0 1
0 2
0 1
0 1
0 3
1 27
0 1
1 32
0 1
0 3
0 1
1 35
1 28
1 34
0 2
1 30
1 31
0 2
0 1
0 2
0 1
0 1
0 1
1 37
0 2...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 3
0 -1
1 3
1 3
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

ok both questions correct

Test #4:

score: 2
Accepted
time: 2ms
memory: 8424kb

input:

1
100
0 3
0 2
0 1
1 3
0 1
1 2
0 1
1 5
0 2
1 6
0 1
0 2
1 8
0 1
1 9
0 4
0 1
1 10
1 11
0 2
1 12
1 4
0 3
1 13
0 1
1 14
0 1
1 15
0 1
0 4
0 4
0 1
1 19
0 2
0 1
0 1
1 21
0 2
0 1
0 1
0 1
1 25
1 23
1 24
0 1
1 27
1 26
1 16
1 18
0 3
0 1
0 1
0 2
0 1
1 30
0 2
0 1
1 28
1 34
0 1
1 32
0 1
1 35
1 29
1 36
1 7
0 1
0 1
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
1 1
0 -1
1 1
1 1
1 1
0 -1
1 1
1 1
1 1
0 -1
1 1
0 -1
1 3
0 -1
1 1
0 -1
1 1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
1 1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

ok both questions correct

Test #5:

score: 2
Accepted
time: 0ms
memory: 8520kb

input:

1
100
0 5
0 2
0 5
1 3
0 2
1 2
0 3
1 4
0 1
0 6
0 7
1 6
1 8
0 6
1 9
0 3
0 2
1 10
1 11
0 2
1 5
1 1
0 2
0 4
0 5
1 15
1 14
1 12
0 5
0 2
1 16
0 6
0 1
1 19
0 3
0 5
0 7
1 21
1 22
0 2
0 1
1 24
1 23
0 5
1 7
1 17
1 20
1 25
0 3
1 26
0 5
0 6
0 1
1 27
1 28
0 3
0 3
1 30
1 31
0 1
0 5
0 2
1 33
1 34
0 1
1 35
1 29
1 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 5
0 -1
1 5
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #6:

score: 2
Accepted
time: 1ms
memory: 8484kb

input:

1
100
0 1
0 3
0 3
1 3
0 8
1 4
0 5
1 5
0 3
0 5
1 7
1 6
0 5
0 4
0 8
1 9
0 1
1 10
0 6
0 1
1 13
1 12
1 11
1 8
0 7
1 14
0 3
0 4
0 1
1 17
1 15
1 16
0 1
0 7
1 18
1 19
0 8
1 20
0 6
1 21
0 4
0 6
1 22
0 3
0 3
1 24
1 25
0 1
0 7
1 26
0 4
1 28
1 27
0 2
0 6
1 29
0 2
1 30
0 5
0 6
0 4
1 34
1 33
1 32
0 7
0 2
0 1
1 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 1
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
0 -1
0 -1
0 -...

result:

ok both questions correct

Test #7:

score: 2
Accepted
time: 1ms
memory: 8372kb

input:

1
100
0 5
0 5
0 7
1 1
0 5
1 2
0 2
0 9
1 6
1 4
0 10
0 6
1 8
1 5
0 7
1 9
0 4
0 6
0 10
0 1
0 5
1 12
0 3
1 11
0 6
0 6
1 15
1 13
0 8
1 17
1 16
0 7
1 14
1 18
1 7
0 1
0 13
0 5
1 22
0 9
1 23
1 20
0 4
0 11
1 24
1 25
1 10
1 21
0 2
1 26
0 13
0 10
0 4
0 2
1 28
1 29
1 30
1 27
0 1
1 31
0 2
1 32
0 13
1 33
0 9
1 34...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 5
1 5
1 5
0 -1
1 5
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 7
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 7
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 7
1 7...

result:

ok both questions correct

Test #8:

score: 2
Accepted
time: 1ms
memory: 8440kb

input:

1
100
0 5
0 12
0 2
1 2
0 1
0 2
1 1
0 1
0 7
1 5
0 3
1 4
1 8
0 6
0 1
1 9
1 3
1 7
0 4
0 3
0 2
0 4
0 1
1 13
0 1
1 14
1 12
0 9
1 17
1 15
0 7
0 2
0 1
0 6
0 1
0 4
1 21
0 1
0 10
1 24
1 22
1 23
1 11
0 1
1 20
0 8
0 10
0 2
0 1
1 27
1 30
0 4
1 31
1 28
0 6
1 32
0 13
1 29
1 16
1 18
1 26
0 12
1 34
1 6
1 10
0 10
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 5
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
1 1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
0 -1
1 1
0 -1
1 1
0 -1
1 1
1 1
1 1
0 -1
0 -1
0 -1
1 1
1 1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #9:

score: 2
Accepted
time: 1ms
memory: 8424kb

input:

1
100
0 14
0 14
0 14
1 3
0 7
1 4
0 18
0 21
0 18
1 7
1 5
0 17
0 24
0 11
1 6
0 7
0 8
0 3
1 1
1 13
1 10
0 7
0 3
0 24
0 19
0 9
0 13
0 1
1 20
0 17
1 21
0 24
0 1
1 16
0 25
1 22
1 14
1 24
0 16
0 10
1 25
1 15
0 3
0 6
1 9
1 27
1 8
1 18
0 14
0 24
1 29
1 30
1 28
1 12
0 9
1 31
1 23
0 2
0 15
1 32
0 1
1 34
0 10
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 14
1 14
1 14
1 14
1 14
1 14
1 14
0 -1
0 -1
0 -1
1 14
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #10:

score: 2
Accepted
time: 1ms
memory: 8488kb

input:

1
100
0 1
0 1
0 16
1 2
0 19
0 4
1 5
0 19
0 7
1 7
0 7
0 15
1 8
0 9
0 5
1 10
1 9
0 3
0 12
1 12
1 11
0 5
0 8
0 9
1 14
0 1
1 16
0 2
0 3
1 19
0 5
1 18
1 20
0 10
0 4
1 21
1 22
1 4
1 3
0 9
0 1
1 23
0 11
0 2
0 6
0 12
0 17
0 13
1 25
0 11
1 31
0 8
0 17
0 5
0 8
0 15
0 10
0 3
1 37
0 16
0 5
0 6
0 5
1 42
0 12
1 4...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 1
1 1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1...

result:

ok both questions correct

Test #11:

score: 2
Accepted
time: 1ms
memory: 8384kb

input:

1
100
0 2
0 4
0 4
1 3
0 4
0 4
0 3
1 6
1 2
0 3
1 7
1 1
0 4
0 4
0 2
0 3
0 4
1 8
1 10
0 3
1 9
0 4
0 3
0 3
0 4
0 4
0 3
1 15
0 4
1 14
1 16
1 12
0 4
1 5
1 21
1 4
0 3
0 4
0 4
0 4
0 3
1 23
1 24
0 3
0 4
0 2
1 26
1 27
0 4
1 30
0 4
0 4
0 3
1 22
1 33
1 32
1 31
1 28
0 4
1 34
1 11
1 13
1 18
0 2
0 4
0 3
0 2
1 35
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 2
0 -1
1 4
0 -1
1 4
1 4
1 4
1 4
1 4
0 -1
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
0 -1
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
0 -1
1 3
0 -1
1 4
1 4
1 4
0 -1
1 3
1 3
1 3
0 -1
0 -1
0 -1
1 4
0 -1
1 4
1 4
1 4
1 4
1 4
...

result:

ok both questions correct

Test #12:

score: 2
Accepted
time: 1ms
memory: 8424kb

input:

1
100
0 4
0 2
0 1
1 2
0 2
0 1
0 4
0 1
1 5
0 3
1 6
1 7
0 1
1 9
0 1
1 10
0 2
0 2
0 2
0 1
0 4
1 12
0 4
1 11
1 13
0 2
0 3
1 18
1 15
1 14
0 2
1 19
0 4
0 3
0 3
1 20
1 21
1 16
0 4
1 23
0 3
1 24
0 4
0 4
0 3
1 17
1 3
0 1
1 28
1 1
0 3
1 26
1 4
1 29
1 22
1 27
0 1
0 2
1 31
1 30
0 3
0 3
0 1
1 34
0 2
1 32
0 2
0 1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

ok both questions correct

Test #13:

score: 2
Accepted
time: 1ms
memory: 8372kb

input:

1
100
0 4
0 3
0 4
0 3
0 4
1 1
0 4
1 6
0 4
1 4
0 4
1 2
1 7
0 4
1 9
1 3
0 3
0 2
1 11
1 10
0 4
0 4
0 4
0 3
0 3
1 12
1 13
1 16
0 1
0 4
1 17
1 14
0 4
0 3
0 4
0 4
0 4
0 2
1 20
1 18
1 19
0 3
0 1
1 26
0 2
1 27
1 25
0 3
1 21
0 3
1 29
0 2
1 23
1 22
1 28
1 15
1 5
1 30
0 3
1 31
0 1
1 32
0 4
1 33
0 3
1 34
0 4
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 4
0 -1
1 4
0 -1
1 4
0 -1
1 4
0 -1
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
0 -1
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
0 -1
1 4
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #14:

score: 2
Accepted
time: 1ms
memory: 8460kb

input:

1
100
0 7
0 7
0 6
0 6
0 9
1 5
0 9
1 6
0 7
0 7
1 8
0 7
0 5
1 7
1 1
0 9
0 4
0 8
1 11
0 8
0 9
1 13
0 4
1 14
1 12
0 6
0 8
1 16
0 4
1 19
1 15
0 4
1 17
1 4
1 10
1 18
1 20
1 3
0 7
0 9
1 22
1 21
0 7
1 23
0 8
0 9
0 9
1 26
0 5
0 7
0 4
0 7
1 28
0 8
0 9
1 29
1 30
0 4
1 24
1 32
0 8
0 8
1 34
0 9
1 35
1 31
0 9
1 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 7
1 7
1 7
0 -1
0 -1
0 -1
0 -1
0 -1
1 7
1 7
1 7
1 7
1 7
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 7
1 7
1 7
1 7
1 7
1 7
1 7
1 7
1 7
0 -1
0 -1
0 -1
0 -1
0 -...

result:

ok both questions correct

Test #15:

score: 2
Accepted
time: 1ms
memory: 8420kb

input:

1
100
0 8
0 7
0 7
1 3
0 9
0 9
1 4
1 5
0 7
0 8
1 7
0 8
1 8
1 1
0 9
0 7
0 7
0 6
0 4
0 7
1 12
1 9
1 10
0 5
1 15
1 6
1 13
0 3
1 2
1 16
0 5
0 6
1 17
1 11
0 8
1 19
0 9
1 20
0 8
0 8
1 22
1 21
0 9
1 23
0 7
0 7
0 9
1 24
1 25
1 26
0 9
1 27
0 5
1 28
0 7
1 29
0 7
0 8
1 31
1 18
0 6
1 32
0 8
1 33
0 6
0 9
1 34
1 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 8
0 -1
1 7
0 -1
0 -1
0 -1
0 -1
0 -1
1 7
0 -1
1 7
0 -1
1 7
1 7
1 7
1 7
1 7
1 7
1 7
1 7
1 7
1 7
1 7
1 7
1 7
1 7
1 7
1 7
1 7
1 7
1 7
0 -1
1 7
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 7
1 7
1 7
0 -1
0 -1
0 -1
0 -1
0 -...

result:

ok both questions correct

Test #16:

score: 2
Accepted
time: 0ms
memory: 8368kb

input:

1
100
0 13
0 7
0 15
1 2
0 14
0 13
1 1
0 10
1 4
0 10
1 7
1 6
0 9
1 8
0 4
1 9
0 13
1 10
0 12
0 15
1 11
0 7
1 12
0 9
1 14
0 11
0 8
1 16
0 14
1 17
1 15
1 5
0 10
1 18
0 13
1 19
0 13
1 3
0 15
1 21
0 14
1 22
0 7
1 23
0 13
0 15
1 24
1 25
0 14
1 26
0 7
1 27
0 2
0 15
1 28
1 20
0 15
0 15
1 31
1 30
0 11
1 32
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 13
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 13
0 -1
0 -1
0 -1
1 15
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 7
0 -1
1 13
0 -1
0 ...

result:

ok both questions correct

Test #17:

score: 2
Accepted
time: 1ms
memory: 8788kb

input:

1
100
0 15
0 12
0 15
0 13
0 12
1 2
0 14
0 15
1 3
0 14
0 13
1 8
0 4
0 7
1 10
1 9
0 13
1 11
1 1
1 4
1 12
0 14
1 5
0 15
0 15
0 11
0 13
0 15
0 12
0 12
0 12
0 14
0 14
0 14
1 15
1 22
1 21
1 19
1 17
1 14
0 15
1 20
0 13
0 13
0 8
1 27
0 7
1 29
0 11
0 7
1 30
1 28
1 26
1 6
0 12
0 11
1 33
0 13
0 12
1 32
1 18
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 15
0 -1
1 15
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 14
0 -1
1 15
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #18:

score: 2
Accepted
time: 1ms
memory: 8428kb

input:

1
100
0 6
0 23
0 26
1 2
0 18
0 22
0 20
0 29
0 17
1 7
0 23
1 9
0 22
1 1
1 6
1 4
0 20
0 24
1 12
0 29
0 23
0 28
0 27
0 16
0 27
0 27
0 28
0 25
0 25
0 30
1 19
0 15
1 17
1 16
1 13
0 27
1 25
0 30
1 15
0 26
0 24
0 25
1 23
1 26
1 21
1 18
0 11
1 20
1 3
0 17
0 12
1 31
0 23
1 32
0 18
1 33
1 34
0 30
0 19
1 36
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 6
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #19:

score: 2
Accepted
time: 1ms
memory: 8452kb

input:

1
100
0 23
0 20
0 29
0 24
0 26
0 23
0 17
1 4
0 26
0 16
1 8
0 26
1 6
1 10
0 30
1 9
0 19
1 1
1 7
1 5
1 11
0 27
1 13
0 20
1 14
1 12
0 24
0 23
1 16
1 15
0 20
0 30
0 26
1 17
1 18
0 15
0 24
1 20
1 21
0 28
0 14
1 23
0 27
0 16
0 19
1 25
0 17
0 30
0 27
0 16
1 27
1 30
1 24
1 26
1 29
0 23
1 31
0 24
0 29
0 22
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 23
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 20
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #20:

score: 2
Accepted
time: 1ms
memory: 8452kb

input:

1
100
0 43
0 47
0 31
0 38
1 1
0 44
0 36
1 6
1 3
1 2
0 46
0 49
0 41
0 16
1 9
0 40
1 11
1 4
1 8
0 49
1 12
0 44
0 41
0 46
1 15
0 34
1 14
0 19
0 21
0 50
0 27
0 42
1 21
1 18
0 36
0 41
0 42
0 26
0 36
0 49
0 3
1 24
1 25
1 22
0 36
0 29
0 49
0 19
0 49
1 31
1 29
1 30
1 10
0 49
0 42
1 35
0 46
1 5
0 20
1 37
1 1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 43
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #21:

score: 2
Accepted
time: 0ms
memory: 8476kb

input:

1
100
0 28
0 44
0 35
1 3
0 46
1 1
0 42
1 2
0 48
0 49
1 6
0 40
1 7
0 41
0 43
0 43
1 11
0 49
0 45
1 13
0 26
1 9
1 10
1 12
1 14
0 44
0 14
1 16
1 15
1 5
0 35
1 17
0 32
1 18
0 47
1 19
0 30
0 46
0 47
1 21
1 22
0 28
0 45
0 44
1 24
0 40
0 37
0 41
1 27
1 26
1 20
1 28
0 15
1 29
1 23
0 43
1 25
0 33
0 46
1 32
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 28
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #22:

score: 2
Accepted
time: 0ms
memory: 8784kb

input:

1
100
0 9
0 10
0 9
0 9
0 10
0 9
1 2
0 10
0 7
0 10
1 6
1 3
1 8
0 9
1 10
0 9
0 10
0 8
1 13
0 10
0 10
1 14
0 7
1 16
1 1
0 9
1 12
1 7
1 5
0 9
1 9
1 11
1 4
1 15
0 7
0 10
0 9
0 10
0 10
1 19
1 22
1 23
1 20
1 18
0 10
0 10
1 24
0 8
1 21
1 17
0 10
0 10
1 28
1 26
0 9
1 29
0 9
0 10
1 31
1 30
0 10
0 10
0 10
0 7
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 9
0 -1
1 9
1 9
1 9
1 9
1 9
1 9
1 9
0 -1
0 -1
0 -1
1 10
0 -1
1 10
0 -1
1 10
0 -1
1 10
1 10
1 10
1 10
1 10
1 10
1 10
1 10
1 10
0 -1
1 9
1 9
1 9
1 9
1 9
1 9
1 9
0 -1
1 9
0 -1
0 -1
0 -1
1 9
1 9
1 9
1 9
1 9
0 -1
1 9
0 -1
0 -1
0 -1
1 1...

result:

ok both questions correct

Test #23:

score: 2
Accepted
time: 1ms
memory: 8680kb

input:

1
100
0 1
0 3
0 1
1 2
0 2
1 4
0 1
0 2
0 3
1 6
1 5
0 1
1 1
0 4
1 9
0 4
0 1
1 11
1 10
0 2
1 12
0 1
0 3
1 13
1 3
1 14
0 3
1 15
0 3
1 16
0 4
0 4
0 2
0 4
0 3
1 18
0 4
1 22
1 19
0 1
0 2
0 3
0 2
1 23
1 24
1 21
1 26
1 20
0 3
1 27
0 4
1 28
0 4
1 29
1 17
0 1
1 30
0 2
0 2
0 2
0 4
0 3
0 1
0 4
0 1
0 3
0 2
1 39
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 1
0 -1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
0 -1
1 1
0 -1
1 1
0 -1
1 1
0 -1
1 1
1 1
1 1
0 -1
1 3
0 -1
1 3
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
0 -1
0 -...

result:

ok both questions correct

Test #24:

score: 2
Accepted
time: 1ms
memory: 8708kb

input:

1
100
0 16
0 18
0 14
0 13
0 15
1 2
1 3
0 17
1 4
0 14
0 14
1 8
1 6
0 16
0 18
0 18
0 18
1 10
0 15
0 17
1 11
1 9
0 16
1 15
0 12
0 16
0 15
1 1
0 12
1 19
1 17
0 13
1 20
1 7
1 14
1 18
0 16
0 16
1 22
1 21
1 5
1 12
0 18
1 23
0 15
1 24
0 18
0 17
1 25
1 26
0 16
1 27
0 18
0 18
0 17
1 28
0 12
1 29
1 31
0 18
1 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 16
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 15
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 15
0 -1
0...

result:

ok both questions correct

Test #25:

score: 2
Accepted
time: 1ms
memory: 8520kb

input:

1
100
0 36
0 40
0 37
1 3
0 40
0 32
0 37
0 35
0 39
0 39
1 4
1 7
1 2
0 37
1 10
0 37
1 11
1 6
1 1
0 39
0 40
0 36
1 13
0 36
0 33
1 16
0 39
1 17
0 34
0 38
1 18
1 19
1 14
1 8
0 36
1 20
0 37
1 21
1 12
1 9
0 39
0 38
0 37
0 39
1 23
1 25
0 38
0 39
1 27
0 40
0 38
0 36
1 30
0 34
0 37
1 31
1 32
0 37
0 38
0 37
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 36
0 -1
0 -1
0 -1
1 40
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 39
1 39
1 39
0 -1
1 39
0 -1
0 -1
0 -1
1 39
0 -1
0 -1
0 -1
0 -1
0 -1
1 39
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #26:

score: 2
Accepted
time: 1ms
memory: 8460kb

input:

1
100
0 99
0 107
0 108
0 106
0 104
0 103
0 106
1 2
0 108
1 8
0 110
1 5
0 110
0 109
0 110
1 12
1 10
0 109
1 13
0 109
0 97
0 108
1 15
1 9
0 109
0 108
1 18
0 100
1 19
0 99
1 1
0 82
0 106
0 107
0 101
0 108
0 108
1 24
0 109
1 26
0 103
1 28
1 25
0 79
1 29
0 110
1 30
0 109
0 109
1 32
1 31
0 110
0 109
0 108...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 99
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #27:

score: 2
Accepted
time: 0ms
memory: 8416kb

input:

1
100
0 30
0 28
0 30
0 30
0 30
0 27
0 30
0 28
1 2
0 26
1 9
1 1
0 29
1 10
1 5
0 28
1 6
1 8
0 28
1 3
1 12
0 28
1 13
0 30
1 14
1 7
0 26
0 30
1 16
0 28
1 15
1 17
0 29
1 18
0 30
1 11
0 29
0 30
1 20
0 30
1 22
1 21
0 30
1 23
0 26
1 24
0 30
1 25
0 30
0 29
1 27
1 26
0 29
1 28
0 30
1 29
0 28
0 30
1 31
0 30
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 30
0 -1
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
0 -1
1 30
1 30
1 30
0 -1
1 30
0 -1
1 30
1 30
1 30
0 -1
0 -1
0 -1
0 -1
0 -1
1 28
0 -1
0 -1
0 -1
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1...

result:

ok both questions correct

Test #28:

score: 2
Accepted
time: 0ms
memory: 8424kb

input:

1
100
0 15
0 20
0 2
1 2
0 12
1 3
0 4
1 5
0 1
1 4
0 9
0 8
0 12
1 9
1 8
0 1
1 10
1 7
0 1
0 5
0 2
0 10
1 11
1 14
0 5
0 8
0 10
0 14
0 14
0 4
1 18
1 16
1 15
1 20
1 12
1 6
1 13
0 2
1 21
1 19
0 3
0 1
1 23
1 22
0 2
1 24
0 21
1 1
0 10
1 26
0 2
0 5
0 2
1 27
1 29
1 28
0 4
1 30
0 2
1 31
0 1
1 32
0 1
1 33
0 3
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 15
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #29:

score: 2
Accepted
time: 1ms
memory: 8480kb

input:

1
100
0 1
0 3
0 3
0 3
1 2
1 4
0 2
1 3
0 1
1 6
0 4
1 5
0 3
1 7
0 4
1 9
0 4
1 10
0 7
1 11
0 2
1 12
0 2
0 1
0 1
1 14
1 13
0 1
0 2
0 2
1 18
1 16
0 2
0 2
1 20
0 5
0 1
0 1
1 22
1 17
1 21
1 19
0 2
0 4
1 24
0 7
0 2
1 27
1 26
0 1
0 1
0 1
1 29
1 30
0 9
1 31
1 25
1 23
0 1
0 4
0 2
1 33
1 34
0 3
0 1
1 36
1 35
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 1
0 -1
1 3
1 3
1 3
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
1 1
1 1
1 1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
1 1
1 1
0 -1
1 1
0 -1
0 -1
0 -1
1 1
1...

result:

ok both questions correct

Test #30:

score: 2
Accepted
time: 1ms
memory: 8428kb

input:

1
100
0 1
0 3
0 10
0 1
0 2
0 2
0 1
0 2
1 8
0 8
1 1
0 2
1 6
0 1
0 4
0 1
0 1
1 13
1 12
1 14
0 1
0 7
1 15
0 2
1 17
1 16
1 5
0 2
0 1
1 19
1 10
1 2
1 7
0 2
0 6
1 21
0 13
0 1
1 22
1 23
0 1
1 24
0 1
0 1
0 1
1 27
1 26
0 2
0 3
1 29
1 28
0 4
1 30
1 25
0 4
1 31
1 11
1 3
1 9
1 18
0 2
1 32
0 1
1 4
0 1
0 6
0 2
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
0 -...

result:

ok both questions correct

Test #31:

score: 2
Accepted
time: 1ms
memory: 8784kb

input:

1
100
0 13
0 9
0 27
1 3
0 12
0 8
1 5
0 6
0 8
1 6
1 7
0 86
0 22
1 9
0 8
1 8
1 2
0 48
1 4
1 11
0 10
0 50
1 12
0 36
1 14
0 6
0 9
1 16
0 17
1 13
0 12
0 6
0 2
0 8
1 18
1 19
0 8
1 22
1 17
0 3
1 23
0 8
1 21
0 26
1 20
1 24
0 6
0 7
1 27
0 5
0 11
0 69
0 7
0 15
0 1
1 32
1 29
0 1
1 34
1 33
0 17
0 1
1 36
1 26
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 13
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #32:

score: 2
Accepted
time: 1ms
memory: 8456kb

input:

1
100
0 10
0 11
0 32
0 4
0 3
1 2
0 7
0 32
0 5
1 7
1 1
1 5
0 28
0 44
1 9
1 6
1 4
1 10
0 24
0 16
0 2
0 57
1 12
0 7
0 7
1 14
0 7
1 17
0 9
1 18
0 15
0 24
0 4
0 72
0 6
0 4
0 15
1 22
0 20
0 27
0 2
0 25
1 26
0 6
0 11
1 31
1 20
1 21
0 25
0 40
0 7
0 41
1 32
1 25
1 34
1 35
0 8
1 15
0 4
1 37
1 11
1 8
0 8
0 50
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 10
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #33:

score: 2
Accepted
time: 1ms
memory: 8408kb

input:

1
100
0 26
0 10
0 22
1 1
0 2
0 23
0 17
0 32
1 5
0 19
1 8
0 9
1 9
0 8
1 10
1 6
0 32
1 3
1 4
0 6
1 12
1 7
0 2
0 6
0 5
0 8
1 14
0 12
1 13
1 16
0 17
1 18
1 15
1 17
0 11
1 19
0 43
0 8
0 5
0 19
0 26
0 3
1 21
0 9
0 1
0 21
0 25
0 17
1 28
0 4
0 19
0 59
1 33
0 4
0 17
1 26
1 30
0 11
0 2
0 7
1 27
0 10
1 39
0 17...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 26
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 32
0 -1
1 32
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #34:

score: 2
Accepted
time: 1ms
memory: 8428kb

input:

1
100
0 4
0 6
0 4
1 2
0 3
0 4
1 3
1 5
0 6
1 6
0 7
0 7
1 7
0 6
1 9
1 1
0 8
1 10
0 3
0 6
0 5
0 5
1 14
1 12
0 4
1 15
1 11
0 7
0 1
1 16
1 17
1 13
0 3
1 18
0 5
1 19
0 4
1 20
0 7
0 1
0 8
1 22
1 23
1 21
0 4
1 24
0 8
0 1
0 4
1 26
1 25
0 5
1 27
1 28
0 7
1 29
0 5
0 1
1 31
1 30
0 9
0 9
1 32
0 5
0 6
0 9
0 3
0 1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 4
0 -1
1 4
1 4
1 4
1 4
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
1 7
0 -1
0 -1
0 -1
1 7
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #35:

score: 2
Accepted
time: 0ms
memory: 8484kb

input:

1
100
0 2
0 2
0 21
0 7
1 4
0 4
0 7
1 5
0 3
1 1
0 43
1 8
0 17
0 7
1 10
0 6
1 2
0 3
1 3
1 11
1 12
0 2
1 13
1 9
0 13
1 14
0 2
1 6
0 48
0 16
0 9
0 2
0 20
1 18
1 20
1 17
0 14
1 21
1 15
1 16
0 5
0 5
1 22
0 4
1 24
0 14
1 23
1 25
0 9
0 19
0 3
1 26
0 3
1 27
0 36
1 30
1 28
1 19
0 8
0 4
1 31
1 32
0 4
0 27
1 33...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 2
1 2
1 2
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #36:

score: 2
Accepted
time: 1ms
memory: 8416kb

input:

1
100
0 5
0 9
0 17
1 2
0 2
1 3
0 5
1 4
0 7
0 15
1 5
1 7
0 15
0 9
1 8
1 9
0 2
0 9
0 11
0 16
0 17
1 12
1 11
0 13
0 4
0 15
0 15
0 11
1 19
0 15
1 20
0 11
0 5
1 22
0 5
1 23
1 15
1 14
1 21
0 41
0 13
0 5
1 26
0 22
0 1
0 14
1 27
1 28
0 1
0 2
0 11
0 8
0 23
0 7
1 33
1 29
1 30
0 32
1 36
1 25
1 31
1 18
0 52
0 4...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 5
0 -1
0 -1
0 -1
0 -1
0 -1
1 5
1 5
1 5
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #37:

score: 2
Accepted
time: 1ms
memory: 8712kb

input:

1
100
0 8
0 25
0 15
1 1
0 6
0 6
1 5
0 47
1 6
0 35
0 11
0 19
0 6
1 8
0 13
0 10
0 31
0 1
0 16
0 9
0 16
0 25
1 12
0 4
0 11
0 22
0 13
0 17
1 21
1 22
0 19
1 14
1 16
1 7
1 23
1 17
0 17
1 25
0 21
1 10
1 20
0 1
1 9
1 13
0 11
0 11
1 29
1 15
1 11
1 26
1 2
1 28
1 18
0 4
0 2
0 8
1 30
1 32
0 3
1 33
1 31
0 11
0 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 8
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #38:

score: 2
Accepted
time: 0ms
memory: 8712kb

input:

1
100
0 12
0 4
0 1
1 3
0 5
0 8
0 8
0 1
0 6
1 5
1 4
0 22
1 6
0 3
0 2
0 15
1 12
1 2
0 5
0 12
1 14
0 5
1 15
1 8
1 9
1 7
0 2
1 13
0 6
1 16
1 1
0 6
0 3
0 1
0 3
1 21
0 12
0 2
0 1
0 10
1 23
1 22
1 24
1 10
1 18
0 1
0 17
0 15
1 28
1 26
1 27
1 17
1 11
0 8
1 29
1 19
0 1
0 5
0 12
1 31
0 10
0 3
1 33
0 17
0 4
1 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 12
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #39:

score: 2
Accepted
time: 1ms
memory: 8480kb

input:

1
100
0 1
0 11
0 1
1 1
0 9
1 4
0 16
1 5
0 6
0 9
1 2
1 7
0 20
1 8
0 3
1 9
0 10
1 6
0 3
0 1
0 1
1 11
1 12
1 13
0 1
1 14
0 8
1 15
0 5
1 16
0 1
1 17
0 2
1 18
0 5
0 1
1 19
0 5
1 20
0 3
1 22
1 21
0 15
0 1
1 23
0 13
1 24
1 25
0 5
0 11
1 26
1 27
0 3
1 10
0 23
0 2
0 2
0 8
0 12
1 32
0 5
0 9
0 3
1 30
1 34
0 4
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
1 1
1 1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #40:

score: 2
Accepted
time: 2ms
memory: 8372kb

input:

1
100
0 27
0 25
0 6
1 3
0 1
0 15
0 3
1 5
0 12
1 7
1 4
0 38
1 6
0 4
1 1
0 8
1 10
0 1
0 3
0 4
1 8
1 9
0 18
0 11
0 20
1 14
1 16
0 16
1 17
1 11
1 12
1 15
0 4
0 11
1 18
0 5
1 20
0 5
0 5
0 4
0 1
1 24
0 19
0 6
0 19
0 7
0 3
0 8
0 2
0 6
1 32
0 8
0 1
0 9
0 7
0 7
1 34
1 37
0 11
1 27
1 31
1 26
1 22
1 23
0 47
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 27
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #41:

score: 2
Accepted
time: 0ms
memory: 8712kb

input:

1
100
0 1
0 4
0 5
1 1
0 4
1 4
0 4
1 5
0 15
1 6
0 21
1 7
0 4
0 31
0 8
0 35
0 33
0 8
1 9
0 2
0 4
1 10
1 2
0 2
0 23
0 3
0 12
0 12
1 18
0 30
0 23
1 21
1 17
1 22
1 16
1 19
0 1
0 11
1 15
0 2
0 13
1 26
1 25
0 53
1 3
0 17
1 28
1 8
1 13
0 45
1 29
1 12
0 11
0 2
1 30
1 31
0 8
0 14
0 18
0 1
0 26
1 32
1 34
0 16
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 1
0 -1
0 -1
0 -1
1 4
0 -1
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #42:

score: 2
Accepted
time: 1ms
memory: 8440kb

input:

1
100
0 498
0 492
0 498
1 1
0 494
0 484
1 3
1 2
0 500
1 6
0 492
1 7
0 480
0 493
1 8
0 483
1 10
0 499
1 4
0 489
1 12
0 498
0 488
1 13
0 481
1 14
1 11
1 9
0 492
1 16
0 487
0 497
0 486
0 500
1 20
1 19
1 18
0 491
1 21
0 494
1 22
0 499
1 23
1 15
0 495
0 488
1 24
1 5
0 495
1 26
0 498
0 494
1 28
0 492
0 45...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 498
0 -1
1 498
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1...

result:

ok both questions correct

Test #43:

score: 2
Accepted
time: 2ms
memory: 8424kb

input:

1
100
0 496
0 470
0 498
0 481
0 489
0 489
1 3
1 2
0 493
0 477
0 493
0 498
0 494
1 11
1 7
1 10
1 1
0 488
1 8
1 6
0 500
1 9
0 498
1 14
1 13
0 497
0 490
0 500
0 478
1 18
0 496
0 492
0 497
0 490
1 19
1 20
1 17
0 491
0 498
1 24
1 5
1 4
0 497
1 23
0 496
0 483
0 496
1 26
0 479
1 27
0 498
0 493
1 30
0 488
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 496
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #44:

score: 2
Accepted
time: 1ms
memory: 8376kb

input:

1
100
0 498
0 499
0 500
0 487
0 500
1 1
0 499
0 499
1 7
1 2
1 4
0 496
1 8
1 6
0 500
1 9
0 495
1 5
0 480
1 10
0 497
1 11
0 494
1 13
0 499
1 14
0 499
1 15
0 500
1 16
0 500
0 497
0 499
1 18
0 500
0 499
0 499
0 496
1 20
0 499
0 496
0 500
1 19
1 21
1 17
0 499
1 27
1 26
0 500
0 498
1 28
1 25
0 495
0 498
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 498
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 500
0 -1
1 500
1 500
1 500
1 500
1 500
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 500
0 -1
1 500
0 -1
0 -1
0 -1
1 500
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #45:

score: 2
Accepted
time: 1ms
memory: 8480kb

input:

1
100
0 8
0 8
0 5
1 2
0 2
0 7
1 3
1 5
0 9
1 1
0 7
1 4
0 8
1 8
0 7
1 9
0 3
0 3
1 10
0 7
1 12
1 11
0 8
0 4
1 14
0 1
0 9
0 5
1 16
1 13
1 15
0 9
1 17
1 6
0 7
0 1
0 6
1 21
0 8
1 19
1 20
1 22
0 4
1 23
0 9
0 7
0 1
1 26
1 25
1 24
0 3
0 3
0 8
1 29
0 7
1 28
1 27
0 2
0 5
1 32
1 31
0 3
1 33
1 30
0 3
0 8
0 8
1 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 8
1 8
1 8
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 7
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 9
0 -1
1 7
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 9
0 -1
0 -1
0 -...

result:

ok both questions correct

Test #46:

score: 2
Accepted
time: 1ms
memory: 8804kb

input:

1
100
0 496
0 493
0 500
0 499
1 2
0 499
0 500
1 6
1 3
1 1
0 499
1 4
0 485
1 8
0 500
1 9
0 499
1 7
0 500
1 11
0 493
0 500
1 12
1 13
0 497
1 14
0 497
0 500
0 495
1 16
0 498
1 15
1 17
1 18
0 495
1 19
0 497
1 20
0 500
0 500
0 498
0 492
0 500
0 499
0 498
1 24
1 27
0 491
1 28
1 26
0 499
1 29
0 500
1 30
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 496
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 499
1 499
1 499
1 499
1 499
1 499
1 499
1 499
1 499
1 499
1 499
1 499
1 499
0 -1
1 499
1 499
1 499
1 499
1 499
0 -1
0 -1
0 -1
0 -1
0 -1
1 499
1 499
1 499
1 499
1 499
1 499
1 499
0 -1
0 -1
...

result:

ok both questions correct

Test #47:

score: 2
Accepted
time: 1ms
memory: 8452kb

input:

1
100
0 490
0 500
0 500
0 499
1 2
0 495
1 1
1 4
0 498
1 3
0 500
1 7
0 499
1 6
0 498
1 8
0 500
1 10
0 499
0 500
0 499
0 499
1 13
1 11
0 498
1 12
1 5
1 15
0 499
1 16
0 500
1 17
0 500
1 18
0 500
0 492
1 20
0 499
0 497
0 498
0 499
1 23
0 500
1 22
1 19
1 25
0 498
1 21
1 26
0 497
0 500
0 499
1 29
1 27
1 2...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 490
0 -1
1 500
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 498
0 -1
1 499
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 499
1...

result:

ok both questions correct

Test #48:

score: 2
Accepted
time: 1ms
memory: 8520kb

input:

1
100
0 500
0 498
0 500
0 498
1 3
1 4
0 500
0 499
0 498
1 5
0 499
1 7
1 1
1 8
0 500
1 2
0 499
0 500
0 500
1 10
1 11
1 12
0 499
1 13
0 500
0 500
0 500
0 500
0 500
0 500
1 16
1 18
1 15
1 19
1 17
0 498
1 20
1 9
0 498
0 499
0 496
1 22
1 21
0 500
0 500
1 24
0 497
0 498
1 26
0 500
1 27
1 28
1 23
0 496
1 2...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 500
0 -1
1 500
0 -1
1 498
0 -1
1 500
0 -1
0 -1
0 -1
0 -1
0 -1
1 499
0 -1
0 -1
0 -1
1 499
0 -1
1 500
1 500
1 500
0 -1
1 499
0 -1
1 500
1 500
1 500
1 500
1 500
1 500
1 500
1 500
1 500
1 500
1 500
0 -1
1 500
0 -1
0 -1
0 -1
0 -1
0 -1...

result:

ok both questions correct

Test #49:

score: 2
Accepted
time: 1ms
memory: 8488kb

input:

1
100
0 1
0 1
0 1
1 2
0 1
0 1
1 3
0 1
1 6
0 1
1 7
0 1
1 8
1 1
0 2
0 1
0 1
0 2
1 12
1 9
0 1
0 3
1 14
1 10
0 2
0 1
1 16
1 4
0 2
1 17
1 5
1 13
0 1
1 18
0 1
0 1
1 20
0 3
1 21
1 15
0 1
0 2
1 23
0 1
0 4
1 24
0 4
0 1
0 1
0 2
0 2
1 29
1 27
1 25
0 2
0 3
0 2
1 33
1 32
1 31
0 2
0 3
1 34
1 35
0 1
0 2
1 36
1 22
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
0 -1
1 1
0 -1
1 1
1 1
1 1
0 -1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
0 -1
0 -...

result:

ok both questions correct

Test #50:

score: 2
Accepted
time: 1ms
memory: 8420kb

input:

1
100
0 1
0 1
0 5
1 1
0 2
1 4
0 2
0 1
1 2
0 2
1 3
0 1
1 8
0 1
1 5
0 4
1 7
0 1
0 3
0 2
0 1
0 2
1 15
1 12
0 1
0 2
1 17
1 16
0 2
0 2
1 19
1 11
1 10
0 1
1 20
1 14
1 18
1 9
0 2
1 21
0 1
0 1
0 2
1 22
1 24
0 1
1 25
1 23
0 3
0 2
1 26
0 1
0 2
1 28
1 29
0 1
0 1
0 1
0 1
1 33
0 4
0 1
0 3
0 1
0 2
0 2
1 39
1 34
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 1
1 1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
0 -1
1 2
0 -1
1 1
0 -1
1 1
1 1
1 1
0 -1
1 1
0 -1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
0 -1
1 1
0 -1
1 1
1 1
1 1
0 -1
1 1
0 -1
1 2
0 -1
1 1
1 1
1 1
0 -1
1 1
1 1
1 1
0 -1
0 -1
0 -1
1 2
0 -1
1...

result:

ok both questions correct

Test #51:

score: 2
Accepted
time: 1ms
memory: 8712kb

input:

1
100
0 48
0 99
0 6
0 99
0 99
0 99
0 99
0 42
0 99
0 39
0 99
0 18
0 99
0 99
0 47
0 99
0 99
0 45
0 99
0 99
0 8
0 99
0 99
0 34
0 99
0 22
0 36
0 49
0 99
0 31
0 99
0 99
0 99
0 99
0 40
0 99
0 12
0 43
0 7
0 30
0 99
0 29
0 19
0 26
0 99
0 99
0 1
0 37
0 46
0 99
0 41
0 11
0 10
0 99
0 99
0 99
0 9
0 99
0 4
0 24
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 48
0 -1
0 -1
0 -1
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1...

result:

ok both questions correct

Test #52:

score: 2
Accepted
time: 1ms
memory: 8484kb

input:

1
100
0 25
1 1
0 19
1 2
0 58
1 3
0 99
1 4
0 39
1 5
0 45
1 6
0 41
1 7
0 3
1 8
0 90
1 9
0 95
1 10
0 9
1 11
0 54
1 12
0 67
1 13
0 39
1 14
0 53
1 15
0 23
1 16
0 44
1 17
0 95
1 18
0 22
1 19
0 16
1 20
0 31
1 21
0 58
1 22
0 7
1 23
0 31
1 24
0 32
1 25
0 6
1 26
0 7
1 27
0 21
1 28
0 78
1 29
0 47
1 30
0 70
1 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 0
1 25
0 -1
1 19
0 -1
1 58
0 -1
1 99
0 -1
1 39
0 -1
1 45
0 -1
1 41
0 -1
1 3
0 -1
1 90
0 -1
1 95
0 -1
1 9
0 -1
1 54
0 -1
1 67
0 -1
1 39
0 -1
1 53
0 -1
1 23
0 -1
1 44
0 -1
1 95
0 -1
1 22
0 -1
1 16
0 -1
1 31
0 -1
1 58
0 -1
1 7
0 -1
1 31...

result:

ok both questions correct

Test #53:

score: 2
Accepted
time: 1ms
memory: 8416kb

input:

1
100
0 99
0 99
0 23
0 99
0 99
0 6
0 99
0 47
0 99
0 22
0 99
1 5
0 48
1 12
0 99
0 99
1 10
0 99
0 5
1 1
0 99
0 99
0 33
0 99
0 40
0 41
1 21
1 6
0 18
0 34
0 11
0 16
1 23
1 24
0 3
1 27
1 25
1 19
1 4
1 3
0 99
0 46
0 30
0 99
0 31
0 99
1 29
0 99
0 99
0 7
1 35
0 99
0 42
1 28
0 99
0 9
1 39
0 99
0 1
0 99
1 42
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1...

result:

ok both questions correct

Test #54:

score: 2
Accepted
time: 1ms
memory: 8408kb

input:

1
100
0 1
0 3
0 3
0 3
0 1
0 4
0 4
1 4
0 3
1 1
1 8
0 4
0 4
0 2
0 2
0 3
1 9
0 1
0 4
1 11
1 6
1 5
1 15
0 1
1 16
1 2
0 2
1 17
0 3
0 1
1 18
1 19
1 14
0 4
0 1
1 21
1 12
1 7
1 13
0 2
0 3
1 23
1 22
1 3
0 4
0 3
0 2
1 24
0 2
1 25
0 3
0 1
1 28
0 2
0 3
0 1
0 4
0 3
0 1
1 32
1 30
1 34
1 35
0 2
0 1
0 1
0 4
1 38
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 1
0 -1
1 3
1 3
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
0 -1
1 4
0 -1
0 -1
0 -1
1 4
1 4
1 4
1 4
1 4
0 -1
0 -...

result:

ok both questions correct

Test #55:

score: 2
Accepted
time: 1ms
memory: 8372kb

input:

1
100
0 1
0 1
0 3
0 3
0 2
1 1
1 5
1 4
0 1
1 6
0 2
1 3
0 2
1 7
0 2
1 9
0 1
0 3
1 10
0 1
1 2
1 8
0 4
0 1
0 1
1 13
0 1
1 15
0 3
0 2
1 18
1 14
0 4
0 3
1 16
0 4
0 4
0 4
1 22
0 1
0 4
1 23
0 4
1 25
0 1
1 24
1 21
0 3
0 1
1 29
0 1
1 30
0 3
1 31
0 3
0 2
1 32
0 3
0 1
1 35
1 28
0 3
1 34
1 19
1 11
1 26
0 4
1 36
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 1
1 1
1 1
0 -1
0 -1
0 -1
1 3
0 -1
1 1
0 -1
0 -1
0 -1
1 2
0 -1
1 2
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
1 1
1 1
1 1
1 1
0 -1
1 1
0 -1
0 -1
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #56:

score: 2
Accepted
time: 0ms
memory: 8420kb

input:

1
100
0 3
0 3
0 7
1 1
0 6
1 4
0 5
1 5
0 7
1 6
0 3
1 2
0 1
1 8
0 4
0 9
1 10
1 7
0 7
1 9
0 1
1 12
0 7
0 3
1 13
1 14
0 7
0 8
0 4
1 15
0 3
0 5
0 8
0 7
1 21
1 20
0 7
0 7
0 7
0 6
0 4
1 25
0 9
1 16
0 7
1 26
0 7
0 6
0 9
0 6
1 22
0 7
0 7
0 2
1 33
1 34
0 8
1 35
0 8
1 37
1 27
1 29
1 17
0 7
0 9
1 38
0 4
1 18
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 3
1 3
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
1 7
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 7
1 7
1 7
1 7
1 7
1 7
1 7
1 7
1 7
1 7
1 7
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 7
0 -1
0 -1
0 -1
0 -1
0 -1
1 7
1 7
1 7
1 7
1 7
0 -1
0 -...

result:

ok both questions correct

Test #57:

score: 2
Accepted
time: 1ms
memory: 8420kb

input:

1
100
0 5
0 7
0 6
0 3
1 4
1 2
0 8
1 5
0 3
1 1
0 6
1 7
0 6
1 8
0 3
0 1
1 9
0 3
1 6
1 3
0 2
1 12
0 3
0 6
0 2
1 13
0 4
0 8
1 16
0 2
1 14
1 15
0 6
1 19
1 17
1 18
0 2
0 5
1 21
0 2
1 22
1 20
0 4
1 23
0 6
0 1
0 2
0 4
1 25
0 2
1 24
1 26
0 3
1 28
0 6
1 30
0 8
1 31
0 3
0 4
0 7
1 33
1 32
0 3
0 6
0 2
1 35
1 36
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 5
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 6
0 -1
1 6
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #58:

score: 2
Accepted
time: 0ms
memory: 8480kb

input:

1
100
0 2
0 5
0 2
1 2
0 5
0 8
0 6
1 6
0 2
1 4
1 1
1 3
0 3
0 2
1 8
0 5
1 5
1 9
0 6
0 5
1 11
1 12
0 7
0 8
1 14
1 13
0 3
0 4
0 5
0 1
0 3
1 16
1 19
1 18
0 1
1 20
1 7
1 17
0 4
1 21
0 1
1 22
0 3
0 4
0 2
1 24
0 5
0 1
0 6
0 6
1 26
0 1
0 5
1 31
1 27
0 4
1 29
1 25
1 28
0 4
0 7
1 23
1 33
1 32
0 2
0 5
0 1
0 2
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 2
0 -1
1 2
1 2
1 2
0 -1
0 -1
0 -1
1 2
1 2
1 2
0 -1
0 -1
0 -1
1 2
0 -1
1 2
0 -1
0 -1
0 -1
1 5
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 5
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

ok both questions correct

Test #59:

score: 2
Accepted
time: 0ms
memory: 8440kb

input:

1
100
0 18
0 4
0 32
0 25
1 2
1 4
0 30
1 5
0 27
0 7
1 7
0 15
1 3
1 6
0 4
0 8
0 24
1 10
1 9
1 1
0 14
0 30
1 12
0 8
0 11
1 15
1 13
1 8
0 13
0 6
1 11
1 14
0 25
0 14
0 32
1 20
0 18
1 19
1 18
1 17
0 9
1 22
0 9
0 6
1 24
1 23
0 20
1 21
0 20
1 26
0 18
0 4
1 28
0 5
1 27
1 29
0 2
1 30
0 16
0 13
1 32
0 23
0 8
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 18
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #60:

score: 2
Accepted
time: 1ms
memory: 8680kb

input:

1
100
0 31
0 10
0 20
0 16
1 4
0 5
1 5
1 1
0 12
0 28
0 17
1 6
0 7
1 8
1 9
1 3
0 18
0 2
0 21
0 1
1 13
1 12
1 7
1 2
0 8
1 14
0 24
0 1
0 26
0 31
1 17
0 7
0 7
0 9
0 9
1 16
0 12
0 14
1 23
1 24
0 22
0 27
0 2
1 21
1 22
0 21
0 25
1 28
1 20
1 19
0 22
0 1
1 31
0 4
1 32
1 25
0 30
0 2
0 2
1 35
1 34
0 2
0 16
1 33...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 31
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #61:

score: 2
Accepted
time: 1ms
memory: 8520kb

input:

1
100
0 2
0 2
0 4
1 3
0 3
0 1
1 2
1 4
0 2
1 6
0 1
0 2
1 8
0 3
1 7
0 4
0 3
1 10
1 11
1 5
0 3
0 2
0 2
1 14
0 2
1 13
0 1
1 15
1 9
0 4
1 17
0 4
0 4
0 3
0 3
1 20
1 21
0 2
1 22
0 2
0 4
0 2
0 2
0 1
1 24
1 18
1 25
0 3
1 28
1 27
0 4
1 29
1 19
0 2
0 3
1 30
0 2
1 32
0 1
1 31
1 33
0 2
0 3
0 4
0 2
0 1
0 1
1 35
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 2
1 2
1 2
1 2
1 2
0 -1
0 -1
0 -1
1 2
0 -1
1 1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
0 -1
1 2
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #62:

score: 2
Accepted
time: 1ms
memory: 8524kb

input:

1
100
0 2
0 3
0 4
1 3
0 3
1 1
0 2
1 5
0 3
1 6
0 4
1 2
0 1
0 1
0 3
0 1
1 9
1 11
0 4
1 12
0 1
0 3
1 8
1 10
1 14
1 4
0 1
1 15
0 4
1 16
0 1
0 1
1 17
1 13
0 2
0 3
0 3
0 1
1 21
0 1
0 3
1 24
1 23
0 3
1 22
0 1
0 2
0 4
0 4
0 3
1 29
1 28
1 27
0 1
0 3
1 30
0 3
0 2
1 32
0 4
0 1
1 25
1 33
1 20
1 26
0 4
0 4
1 38
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 2
0 -1
0 -1
0 -1
1 3
1 3
1 3
1 3
1 3
1 3
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
0 -1
0 -1
0 -1
1 1
0 -1
1 4
0 -1
1 1
1 1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #63:

score: 2
Accepted
time: 1ms
memory: 8428kb

input:

1
100
0 4
0 5
0 1
0 7
0 5
0 2
1 3
0 2
0 5
1 8
0 5
1 5
1 6
0 2
0 8
1 11
1 1
0 6
1 12
0 7
0 3
1 13
1 14
1 4
0 1
1 10
0 8
1 16
1 7
1 9
0 2
0 3
1 18
1 17
0 4
0 5
0 5
0 1
1 22
1 21
0 4
1 19
1 20
0 7
0 2
1 24
1 25
1 15
0 7
0 3
0 3
0 6
1 26
1 27
1 29
1 23
0 6
1 30
0 8
0 3
1 31
1 32
0 7
0 5
1 34
1 33
0 8
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 5
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 5
0 -1
1 5
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #64:

score: 2
Accepted
time: 0ms
memory: 8424kb

input:

1
100
0 8
0 2
0 5
0 6
1 3
1 4
0 2
0 4
1 2
0 6
0 7
1 7
1 5
1 8
0 8
0 6
1 9
0 6
0 5
0 4
0 7
0 3
1 12
0 2
1 15
0 7
0 5
1 11
1 18
1 10
1 14
1 13
0 8
1 6
1 1
0 8
0 4
0 3
1 20
1 21
1 22
1 16
0 5
0 1
0 7
1 25
0 3
0 5
1 23
1 26
0 1
1 27
0 7
0 4
0 2
0 2
0 5
1 29
1 31
1 30
0 7
0 1
1 33
0 1
0 4
1 37
0 6
0 7
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 8
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 8
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1...

result:

ok both questions correct

Test #65:

score: 2
Accepted
time: 0ms
memory: 8428kb

input:

1
100
0 17
0 17
0 26
0 21
0 1
1 2
1 3
0 31
1 6
1 5
0 30
0 5
1 4
1 8
0 10
0 8
0 3
1 11
1 1
1 9
0 13
1 12
0 2
0 11
0 18
1 15
1 13
1 14
0 20
0 14
1 17
0 16
1 18
0 10
1 19
0 21
1 20
1 16
0 17
0 30
0 25
0 25
0 2
0 3
0 4
1 27
1 25
1 21
0 14
0 23
0 19
1 29
1 28
1 22
0 24
0 26
1 31
0 32
1 33
0 23
0 3
0 31
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 17
1 17
1 17
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #66:

score: 2
Accepted
time: 1ms
memory: 8784kb

input:

1
100
0 29
0 23
0 14
0 13
0 2
0 5
0 24
1 1
0 13
0 18
1 7
0 16
0 19
1 10
0 30
0 1
0 3
1 14
1 8
1 9
0 31
0 28
1 11
0 2
1 12
1 15
0 3
1 18
0 23
0 11
0 9
0 17
1 20
0 30
1 23
0 24
0 1
1 21
1 19
1 2
0 15
1 13
1 25
0 31
1 27
1 3
0 2
0 8
1 28
1 29
1 22
0 21
1 17
1 16
0 13
1 31
1 30
1 26
0 23
1 32
1 5
0 3
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 29
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #67:

score: 2
Accepted
time: 0ms
memory: 8520kb

input:

1
100
0 6
0 2
0 6
1 1
0 12
0 2
1 4
0 11
0 12
0 12
0 3
0 3
1 7
0 10
0 9
0 13
1 5
1 13
1 9
0 7
0 14
1 15
1 12
0 3
0 2
1 17
0 1
0 14
0 13
1 19
1 20
1 10
0 15
1 3
1 16
1 6
1 18
1 8
1 14
0 7
1 22
1 11
0 8
0 4
0 7
0 2
0 1
1 27
1 26
0 6
1 24
0 3
1 29
0 8
1 30
0 7
0 13
1 32
0 9
1 33
0 5
1 34
1 31
1 21
0 4
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 6
0 -1
1 6
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1...

result:

ok both questions correct

Test #68:

score: 2
Accepted
time: 1ms
memory: 8388kb

input:

1
100
0 1
0 2
0 3
1 2
0 4
1 1
0 4
1 5
0 4
1 4
0 3
0 1
0 2
1 8
0 1
0 4
1 11
1 7
1 10
0 4
1 12
0 2
0 2
1 14
1 9
1 13
0 2
1 15
0 1
0 3
1 17
0 4
1 16
0 4
0 4
0 2
0 1
0 4
0 2
1 19
0 4
1 18
1 22
0 4
0 4
0 2
0 2
0 3
1 26
1 30
0 3
1 25
1 31
0 1
0 2
0 3
1 32
0 3
1 35
1 33
1 27
0 4
0 3
1 36
1 20
1 28
1 24
0 2...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
0 -1
1 4
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
1 4
1 4
1 4
1 4
1 4
1 4
0 -1
1 4
0 -1
1 4
1 4
1 4
1 4
1 4
0 -1
0 -1
0 -1...

result:

ok both questions correct

Test #69:

score: 2
Accepted
time: 1ms
memory: 8484kb

input:

1
100
0 1
0 3
0 3
1 3
0 4
0 3
1 5
1 4
0 1
1 1
0 3
0 2
0 1
0 4
0 3
0 2
0 2
0 4
0 3
1 9
1 13
1 6
0 3
0 3
1 17
0 4
1 18
0 3
0 1
0 1
1 19
0 1
1 8
0 2
0 3
1 24
1 23
0 2
0 3
0 3
0 1
0 2
0 4
0 1
1 26
0 2
1 32
0 2
1 30
1 27
1 15
0 2
0 3
0 4
0 4
1 35
0 1
1 38
0 4
1 34
1 21
0 4
0 2
1 41
0 4
1 10
1 31
1 42
1 2...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 1
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
1 3
1 3
0 -1
1 3
1 3
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #70:

score: 2
Accepted
time: 1ms
memory: 8424kb

input:

1
100
0 15
0 1
0 5
1 3
0 6
1 4
0 13
0 2
0 3
1 7
0 5
1 8
1 1
1 2
0 4
1 9
0 10
1 10
0 7
0 1
1 11
1 12
0 6
1 13
0 2
0 13
1 14
1 15
0 3
0 14
1 16
1 17
0 2
1 18
0 8
0 15
1 19
1 20
0 7
0 3
0 6
1 22
1 21
0 7
1 23
1 6
0 9
1 25
0 5
1 26
0 15
1 27
0 11
0 4
0 9
0 6
0 9
0 10
0 6
0 13
1 33
0 14
0 5
0 2
0 14
1 34...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 15
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
0 -1
1 13
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

ok both questions correct

Test #71:

score: 2
Accepted
time: 1ms
memory: 8428kb

input:

1
100
0 10
0 8
0 2
0 14
0 7
1 1
0 2
1 6
1 4
0 5
1 5
1 2
0 11
1 3
0 4
1 9
0 4
0 1
0 4
0 6
1 11
1 10
0 9
0 14
0 4
0 10
1 16
1 12
1 15
0 7
0 6
1 18
1 13
1 17
0 14
1 20
0 5
0 10
0 3
1 22
0 6
1 21
0 13
0 1
1 26
0 2
1 27
1 24
1 8
0 14
0 10
1 29
1 28
1 25
0 7
1 30
0 6
1 14
0 9
0 4
0 3
0 4
1 33
0 12
0 12
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 10
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Subtask #2:

score: 6
Accepted

Test #72:

score: 6
Accepted
time: 3ms
memory: 8580kb

input:

2
5000
0 2
0 1
0 3
1 3
0 4
1 4
0 3
1 5
0 1
0 2
1 7
1 1
0 2
0 3
0 3
1 9
1 8
1 10
0 1
1 11
0 2
0 4
1 12
0 4
0 4
0 3
1 14
1 15
0 1
1 13
0 3
0 3
1 2
0 4
0 3
1 21
0 1
1 22
1 20
1 6
1 16
1 19
0 3
1 23
0 4
0 1
0 1
1 25
1 18
1 17
0 4
0 4
0 1
0 4
0 2
1 31
1 28
1 27
0 4
1 32
1 29
1 26
0 4
1 33
0 2
0 3
1 35
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
1 1
1 1
1 1
0 -1
0 -1
0 -1
1 1
1 1
1 1
1 1
1 1
0 -1
1 1
0 -1
1 4
0 -1
0 -1
0 -1
1 1
1 1
1 1
0 -1
1 3
0 -1
1 3
0 -1
0 -1
0 -1
1 3
1 3
1 3
0 -1
1 3
0 -1
0 -1
0 -1
1 1
0 -1
1 1
0 -1
1 4
...

result:

ok both questions correct

Test #73:

score: 6
Accepted
time: 3ms
memory: 8616kb

input:

2
5000
0 1
0 2
0 1
1 3
0 2
0 2
0 1
1 4
0 1
1 5
1 1
1 6
0 2
1 2
0 1
0 2
1 9
0 2
1 10
1 11
0 2
0 2
0 2
1 13
0 2
1 14
1 15
0 2
0 2
0 1
0 2
1 17
0 1
1 19
0 1
1 18
1 16
0 1
0 1
0 2
1 23
1 22
0 1
0 1
1 25
1 26
1 24
1 7
1 21
0 1
0 1
1 28
0 1
0 1
0 2
1 31
1 29
1 30
1 27
0 2
1 32
1 20
0 1
1 12
0 1
1 34
0 1
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 1
0 -1
1 1
0 -1
1 2
1 2
1 2
0 -1
1 1
1 1
1 1
0 -1
1 2
0 -1
1 1
0 -1
1 2
1 2
1 2
0 -1
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
0 -1
1 1
0 -1
1 1
1 1
1 1
1 1
1 1
0 -1
1 1
1 1
1 1
0 -1
1 1
0 -1
1 2
0 -1
1 1
0 -1
1 1
1 1
1...

result:

ok both questions correct

Test #74:

score: 6
Accepted
time: 0ms
memory: 8520kb

input:

2
5000
0 3
0 2
0 2
1 3
0 3
1 1
0 1
0 2
1 4
1 2
0 2
0 2
1 8
1 7
0 1
0 2
1 9
0 2
1 11
0 1
1 12
1 5
0 1
0 1
0 4
0 3
0 3
0 3
0 3
1 16
0 2
0 1
1 20
1 18
1 15
1 17
0 1
1 19
0 1
1 13
1 21
1 14
1 10
0 1
1 24
0 3
1 25
0 2
1 26
0 2
0 2
1 27
1 28
0 3
1 29
0 1
0 2
1 30
1 22
1 31
0 3
0 1
0 1
0 1
1 32
1 35
1 33
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 3
0 -1
1 2
0 -1
1 3
0 -1
0 -1
0 -1
1 2
0 -1
1 2
1 2
1 2
0 -1
1 1
0 -1
1 2
1 2
1 2
0 -1
1 2
1 2
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
1 1
1 1
1 1
1 1
0 -1
1 1
1 1
1 1
0 -1
1 1
0 -1
1 1
0 -1
1 2
0...

result:

ok both questions correct

Test #75:

score: 6
Accepted
time: 0ms
memory: 8512kb

input:

2
5000
0 3
0 1
0 1
0 1
1 3
0 1
1 1
0 1
0 1
0 3
0 2
1 7
1 6
0 2
1 9
0 2
0 4
1 11
1 2
0 2
1 13
1 5
1 12
1 10
0 1
1 14
0 1
1 15
0 3
0 2
1 16
1 17
0 2
1 18
0 1
1 19
0 2
0 2
0 1
0 1
1 21
1 22
0 1
0 2
0 2
1 24
0 2
0 2
1 23
1 25
0 3
1 28
0 2
1 30
0 1
0 1
0 2
0 2
0 2
0 3
0 1
1 31
1 35
0 1
1 33
0 1
1 34
0 2
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 3
0 -1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
1 1
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
1 1
0 -1
0 -1
0 -1
1 2
1 2
1 2
1 2
1 2
...

result:

ok both questions correct

Test #76:

score: 6
Accepted
time: 3ms
memory: 8552kb

input:

2
5000
0 1
0 6
0 2
1 3
0 2
1 4
0 6
0 4
1 5
0 3
0 3
1 8
0 4
1 9
1 6
1 1
0 5
0 2
1 10
1 11
0 2
1 12
0 4
1 13
0 2
1 14
0 2
1 15
0 1
0 1
0 6
0 2
1 19
0 1
1 17
0 1
0 1
0 5
1 23
1 18
1 16
1 20
1 22
1 2
0 6
0 3
1 24
0 4
0 4
0 6
0 5
0 5
0 5
0 6
0 8
0 1
0 7
1 30
1 27
0 4
0 2
1 32
1 28
0 7
1 37
0 1
0 3
1 39
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
1 6
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
1 1
1 1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
0 -...

result:

ok both questions correct

Test #77:

score: 6
Accepted
time: 3ms
memory: 8884kb

input:

2
5000
0 3
0 1
0 2
1 2
0 6
0 6
1 1
1 3
0 2
0 3
1 6
1 7
0 7
1 8
0 7
0 3
1 10
1 9
0 8
1 11
0 3
1 5
0 7
1 12
0 4
1 14
0 2
0 1
0 3
0 2
1 18
1 15
0 6
0 6
1 19
1 16
0 1
1 21
0 5
0 3
0 7
0 3
1 23
1 24
0 1
0 5
1 27
1 25
0 5
0 2
0 9
1 30
0 1
1 31
1 26
1 29
1 22
0 2
1 17
1 32
0 1
0 2
0 2
0 3
0 3
1 37
1 36
1 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
1 6
1 6
1 6
0 -1
1 6
1 6
1 6
1 6
1 6
0 -1
1 6
1 6
1 6
1 6
1 6
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #78:

score: 6
Accepted
time: 0ms
memory: 8516kb

input:

2
5000
0 3
0 5
0 2
1 1
0 1
1 2
0 3
0 3
0 11
0 5
0 10
0 1
0 4
1 5
0 2
1 10
0 3
0 5
0 4
1 6
0 1
0 14
1 17
1 15
0 1
0 13
0 9
0 7
0 1
1 21
0 7
1 18
0 6
0 3
0 3
1 24
1 19
0 8
0 3
1 27
0 8
0 2
0 8
0 3
0 1
1 32
0 6
1 30
1 23
1 25
1 29
1 31
1 11
0 5
1 4
1 20
0 3
0 9
0 6
1 37
1 36
0 9
0 2
1 38
0 9
0 12
1 41
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #79:

score: 6
Accepted
time: 3ms
memory: 8524kb

input:

2
5000
0 1
0 8
0 10
1 2
0 5
1 1
0 9
0 9
0 6
1 7
1 3
1 5
0 7
0 3
1 9
1 8
0 8
0 9
1 11
0 11
1 12
1 6
0 9
0 4
1 13
0 12
0 8
0 1
1 17
0 10
0 3
1 19
1 15
1 14
1 16
1 10
0 2
0 1
1 20
0 6
1 22
0 11
1 23
1 18
0 2
0 10
0 8
0 2
1 26
0 9
0 11
1 25
1 28
0 6
1 30
0 4
0 7
0 2
1 31
1 33
0 2
1 34
0 5
0 5
1 36
1 29
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 9
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

ok both questions correct

Test #80:

score: 6
Accepted
time: 3ms
memory: 8888kb

input:

2
5000
0 15
0 2
0 13
1 3
0 18
1 4
0 8
0 11
0 2
1 7
1 6
0 18
0 1
1 5
0 8
0 1
0 8
0 9
0 1
1 10
1 12
1 8
0 13
1 9
1 15
0 2
0 23
0 6
1 18
0 19
0 10
0 15
1 20
0 5
1 22
0 1
1 19
1 16
1 17
1 11
0 3
0 6
1 25
1 24
0 6
0 7
1 27
1 26
1 21
0 18
1 28
1 2
1 23
0 11
0 8
1 29
0 20
0 1
1 32
1 31
1 30
1 1
0 6
0 9
1 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 15
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #81:

score: 6
Accepted
time: 3ms
memory: 8580kb

input:

2
5000
0 11
0 20
0 3
1 1
0 4
0 17
1 5
1 2
0 16
1 4
0 24
0 9
1 8
1 7
0 4
1 9
0 11
0 3
1 10
0 17
1 11
1 12
0 1
1 3
0 16
1 14
0 14
1 15
0 13
1 16
0 23
0 4
1 17
0 15
1 19
1 18
0 17
0 15
1 21
0 17
0 20
0 3
1 24
0 8
1 22
0 22
1 26
1 20
0 9
1 27
1 23
0 11
1 28
1 25
0 8
1 6
0 24
0 11
0 1
1 32
0 1
1 33
1 31
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 11
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
1 16
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #82:

score: 6
Accepted
time: 3ms
memory: 8516kb

input:

2
5000
0 4
0 4
0 3
1 1
0 2
1 2
0 4
0 2
0 3
1 3
0 4
1 5
0 4
0 3
1 10
1 6
0 4
1 11
0 4
0 4
1 13
0 3
0 4
1 12
1 7
1 14
1 8
0 4
1 16
1 15
0 3
0 2
1 18
0 4
0 2
0 2
0 2
1 19
0 4
1 23
1 17
1 21
1 22
0 2
0 3
0 4
1 26
0 4
0 4
0 4
1 29
0 4
0 3
0 3
0 4
1 30
0 4
1 34
0 4
1 35
0 4
0 4
0 4
0 3
0 4
0 4
1 38
0 4
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 4
1 4
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
0 -1
1 4
1 4
1 4
0 -1
1 4
0 -1
1 4
1 4
1 4
1 4
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
0 -1
1 2
0 -1
0 -1
0 -1
0 -1...

result:

ok both questions correct

Test #83:

score: 6
Accepted
time: 3ms
memory: 8520kb

input:

2
5000
0 2
0 2
0 3
1 1
0 4
0 2
0 4
1 3
0 4
0 1
1 2
0 1
0 3
1 10
0 4
0 2
0 2
0 1
0 3
1 12
0 3
0 3
1 14
1 16
0 4
1 13
0 2
1 18
0 4
0 3
0 2
0 2
1 23
1 19
1 15
1 9
1 20
1 6
0 4
0 4
0 4
1 25
1 24
0 3
0 4
1 26
1 27
0 2
0 1
0 2
1 30
1 29
0 3
1 7
1 4
1 17
1 5
1 32
1 31
1 22
1 21
1 28
0 4
1 33
0 4
1 34
0 1
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 2
1 2
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
0 -1
1 4
0 -1
0 -1
0 -1
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

ok both questions correct

Test #84:

score: 6
Accepted
time: 3ms
memory: 8888kb

input:

2
5000
0 4
0 4
0 3
1 3
0 4
1 4
0 3
1 1
0 3
0 2
1 2
1 5
0 4
1 8
0 4
1 6
0 2
0 2
1 11
1 10
0 4
1 12
0 4
0 4
0 3
0 4
0 4
0 4
0 4
1 15
0 3
1 20
1 18
1 16
1 14
0 4
0 2
0 4
1 21
0 4
0 3
1 24
1 25
1 22
1 9
0 2
0 4
0 4
1 28
1 26
0 4
0 3
1 30
1 29
0 4
1 31
0 4
1 32
0 4
1 33
0 4
1 34
0 4
0 3
0 3
1 35
0 4
0 4
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 4
1 4
1 4
1 4
1 4
1 4
1 4
0 -1
1 3
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
1 2
1 2
0 -1
1 4
0 -1
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 ...

result:

ok both questions correct

Test #85:

score: 6
Accepted
time: 3ms
memory: 8812kb

input:

2
5000
0 9
0 5
0 9
1 3
0 9
1 4
0 7
1 1
0 8
0 9
1 2
1 5
0 6
1 7
0 6
1 9
0 8
0 5
1 10
0 8
0 8
1 12
1 13
1 11
0 4
1 14
0 9
0 8
1 15
1 16
0 6
1 17
0 9
1 18
0 9
1 8
0 9
0 5
1 20
0 5
0 9
1 23
0 4
0 6
1 24
0 5
1 21
1 26
1 22
0 9
0 6
0 5
0 8
0 6
0 9
1 31
1 28
1 27
1 32
1 30
1 25
0 9
1 33
1 29
0 8
0 8
0 8
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 9
0 -1
1 9
0 -1
1 9
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 6
0 -1
1 8
0 -1
0 -1
0 -1
1 8
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 8
0 -1
1 6
0 -1
0 -1
0 -1
0 -1
0 -1
1 9
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #86:

score: 6
Accepted
time: 3ms
memory: 8540kb

input:

2
5000
0 8
0 3
0 9
0 9
1 1
0 9
0 9
1 2
0 7
1 4
0 8
0 8
1 6
0 9
0 8
0 8
0 8
0 8
0 9
0 6
0 7
0 4
0 8
1 16
1 5
0 9
0 9
1 18
0 8
1 12
1 19
0 9
1 22
0 8
1 24
1 10
1 21
1 17
0 6
0 9
1 25
0 7
0 7
1 28
0 8
1 29
1 15
1 27
1 11
1 3
0 8
0 7
1 30
1 31
0 9
0 7
1 33
0 7
0 8
0 7
0 7
1 35
1 32
0 9
0 9
0 3
0 8
0 6
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 8
0 -1
0 -1
0 -1
1 9
1 9
1 9
1 9
1 9
1 9
1 9
0 -1
0 -1
0 -1
0 -1
0 -1
1 8
1 8
1 8
0 -1
0 -1
0 -1
0 -1
0 -1
1 8
0 -1
0 -1
0 -1
1 8
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1...

result:

ok both questions correct

Test #87:

score: 6
Accepted
time: 0ms
memory: 8524kb

input:

2
5000
0 11
0 7
0 10
0 14
1 2
1 1
0 13
1 5
0 13
1 6
0 12
0 15
1 7
0 5
0 10
1 9
1 10
0 9
1 11
0 15
1 12
0 13
0 12
1 4
1 14
0 7
1 15
0 14
0 15
0 7
0 11
0 15
1 20
0 13
1 16
0 10
0 14
0 15
1 21
0 10
1 25
0 10
1 22
1 26
1 18
0 11
1 27
0 15
1 28
0 10
1 29
0 4
1 24
1 30
0 9
0 12
1 31
1 32
1 23
1 17
1 13
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 11
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #88:

score: 6
Accepted
time: 0ms
memory: 8520kb

input:

2
5000
0 10
0 15
0 11
1 2
0 6
0 14
0 8
0 11
1 6
0 14
0 7
0 15
1 10
1 7
0 15
1 11
1 1
1 8
0 15
0 11
0 13
1 13
0 12
0 12
1 15
1 5
0 15
1 4
1 3
0 13
1 14
0 15
1 17
1 19
1 9
1 12
0 10
0 4
1 21
1 20
0 6
0 5
1 23
1 18
0 13
0 13
1 24
1 25
0 12
0 12
0 10
0 12
0 14
1 28
0 13
0 7
1 31
0 14
1 32
1 26
1 29
0 7
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 10
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #89:

score: 6
Accepted
time: 3ms
memory: 8528kb

input:

2
5000
0 29
0 27
0 24
1 2
0 9
1 3
0 28
1 5
0 27
1 4
0 15
0 29
1 8
1 7
0 30
1 9
0 14
0 23
0 30
0 27
1 11
0 30
0 30
0 27
1 13
0 12
1 12
1 16
1 10
0 30
0 15
1 18
0 28
0 23
1 20
0 28
1 22
1 17
1 6
1 19
1 14
1 15
0 20
1 23
0 21
1 24
0 19
0 16
0 16
0 29
0 14
1 27
1 29
0 26
1 25
1 28
0 17
1 31
1 30
1 21
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 29
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #90:

score: 6
Accepted
time: 3ms
memory: 8812kb

input:

2
5000
0 25
0 28
0 23
0 25
0 27
1 1
1 5
1 4
0 27
0 18
0 17
0 20
1 6
1 2
1 3
0 28
0 29
1 11
1 8
0 17
1 12
1 7
0 24
1 13
0 22
0 14
0 29
1 15
0 26
0 26
0 21
0 23
0 28
1 18
0 24
0 16
0 26
1 23
0 23
0 27
1 26
1 22
0 17
1 17
0 30
1 28
1 24
1 14
1 20
1 25
1 27
0 16
1 29
1 19
1 16
1 21
0 27
1 30
0 22
0 21
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 25
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #91:

score: 6
Accepted
time: 3ms
memory: 8560kb

input:

2
5000
0 38
0 25
0 43
0 40
0 42
1 3
0 18
0 50
0 21
1 7
1 5
1 1
1 6
1 4
0 31
1 9
0 36
1 8
0 44
0 40
0 35
0 40
1 12
0 50
1 15
1 14
0 45
1 13
1 16
0 50
1 17
0 48
0 32
0 46
1 20
0 21
0 38
0 45
0 41
1 21
0 28
0 40
1 18
1 24
1 25
0 37
0 32
1 27
1 19
0 45
1 29
1 23
1 22
1 26
1 2
1 28
0 28
0 40
0 36
0 25
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 38
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #92:

score: 6
Accepted
time: 3ms
memory: 8476kb

input:

2
5000
0 49
0 33
0 42
1 2
0 43
1 1
0 48
0 35
0 44
1 4
0 50
1 8
0 43
1 5
0 44
1 10
0 49
0 44
1 12
1 11
0 31
1 13
1 3
1 9
0 49
1 14
0 34
0 26
0 40
0 37
1 15
0 43
0 44
1 16
0 29
0 39
1 22
1 17
1 18
0 26
1 19
0 46
1 24
0 46
0 36
0 48
0 46
1 26
0 28
0 42
0 29
0 50
1 30
1 25
1 32
0 34
1 33
0 49
0 42
1 29
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 49
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #93:

score: 6
Accepted
time: 3ms
memory: 8584kb

input:

2
5000
0 9
0 7
0 9
0 5
0 10
1 4
0 9
0 7
1 2
1 7
1 5
0 10
0 8
1 8
0 6
0 10
1 11
0 9
1 12
1 10
0 10
0 9
0 9
1 15
0 10
0 6
1 13
1 14
1 17
1 16
0 3
1 18
0 8
0 9
1 19
0 10
0 9
1 21
1 22
0 10
1 23
1 20
1 6
1 1
0 10
0 9
1 25
0 10
0 8
1 26
1 27
0 10
0 9
1 29
1 28
1 24
0 8
0 10
1 31
1 30
0 6
0 10
1 32
0 9
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 9
0 -1
1 9
0 -1
0 -1
0 -1
1 9
0 -1
1 9
1 9
1 9
1 9
1 9
1 9
1 9
0 -1
1 9
1 9
1 9
1 9
1 9
1 9
1 9
1 9
1 9
0 -1
1 9
0 -1
1 9
1 9
1 9
1 9
1 9
1 9
1 9
1 9
1 9
1 9
1 9
1 9
1 9
1 9
1 9
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #94:

score: 6
Accepted
time: 3ms
memory: 8580kb

input:

2
5000
0 2
0 4
0 3
1 2
0 3
1 3
0 1
0 4
0 2
1 5
1 6
1 7
0 4
1 8
0 2
1 9
0 4
1 10
0 2
0 3
1 12
1 11
0 3
1 13
0 3
0 3
0 1
1 16
1 14
0 4
0 2
1 15
1 17
0 4
1 1
1 18
0 4
1 20
0 4
1 21
0 3
1 22
0 4
1 23
0 1
0 4
0 4
0 4
0 2
0 2
1 24
1 28
1 25
1 26
1 29
1 27
0 4
0 1
1 31
0 4
1 32
1 30
0 3
1 33
0 1
0 4
0 4
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 2
0 -1
0 -1
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
1 2
0 -1
1 2
0 -1
1 3
0 -1
1 3
1 3
1 3
1 3
1 3
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
1 4
0 -1
1 4
0 -1
1 3
0 -1
1 4
0 -1
0 -1
0 -1
1 4
1 4
1 4
0 -1
1...

result:

ok both questions correct

Test #95:

score: 6
Accepted
time: 0ms
memory: 8776kb

input:

2
5000
0 13
0 10
0 15
0 14
0 17
0 17
0 17
1 2
0 17
1 8
0 13
0 9
1 9
1 7
0 8
1 11
1 6
1 4
1 5
1 1
0 15
0 18
1 13
0 14
0 15
0 15
0 10
1 15
1 12
1 16
0 15
1 14
1 17
1 10
0 17
1 19
0 16
1 20
0 18
1 21
0 16
0 18
0 18
0 9
1 22
0 16
0 14
1 27
1 24
0 11
1 28
1 23
1 25
1 18
0 17
1 29
0 18
0 18
0 14
0 12
1 33...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 13
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 17
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 15
0 -1
1 15
0 -1
1 15
1 15
1 15
0 -1
0 -1
0 -1
0 -1
0 -1
1 15
1 15
1 15
1 15
1 15
1 15
1 15
1 15
1 15
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #96:

score: 6
Accepted
time: 3ms
memory: 8524kb

input:

2
5000
0 38
0 37
0 37
1 1
0 38
0 34
0 36
0 39
1 7
0 39
0 40
0 40
0 38
0 40
0 39
1 10
1 9
1 4
0 38
1 6
0 39
1 11
0 39
0 38
0 32
1 16
1 3
0 38
1 19
0 40
1 20
0 35
1 21
0 39
1 22
0 32
0 36
0 40
1 25
1 24
0 39
0 39
0 39
1 27
0 39
1 28
1 29
1 26
1 15
1 18
1 13
0 38
0 39
0 39
0 39
0 40
1 32
0 40
0 38
1 33...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 38
0 -1
1 37
1 37
1 37
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #97:

score: 6
Accepted
time: 3ms
memory: 8776kb

input:

2
5000
0 110
0 110
0 109
0 106
0 104
0 110
0 106
0 107
0 109
0 108
1 5
0 106
1 8
1 3
0 109
0 109
0 108
0 105
0 108
1 15
0 108
0 106
0 110
0 110
0 103
0 110
0 98
1 21
1 19
0 110
0 109
1 22
0 109
0 104
0 110
0 109
0 103
1 28
1 16
1 1
0 107
1 31
0 107
0 108
0 110
1 4
0 100
1 35
0 94
1 36
1 25
0 93
0 10...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 110
1 110
1 110
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

ok both questions correct

Test #98:

score: 6
Accepted
time: 3ms
memory: 8524kb

input:

2
5000
0 27
0 26
0 29
1 1
0 30
0 28
1 4
1 3
0 30
0 29
0 30
1 8
1 7
0 30
0 28
1 9
1 10
0 30
0 30
0 30
1 12
1 2
1 5
0 27
0 29
1 14
0 30
1 11
1 13
1 15
0 29
1 17
0 30
1 18
0 27
0 30
1 19
0 27
0 28
0 25
1 21
1 22
0 29
1 23
1 20
0 30
1 25
1 24
0 30
1 26
0 30
1 27
0 30
0 30
0 30
1 29
1 30
1 16
0 29
0 29
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 27
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
0 -1
1 30
1 30
1 30
1 30
1 30
1 30
1...

result:

ok both questions correct

Test #99:

score: 6
Accepted
time: 3ms
memory: 8524kb

input:

2
5000
0 3
0 1
0 1
0 2
1 2
0 5
1 5
0 1
0 11
0 3
1 7
0 3
0 13
1 10
1 8
1 6
0 2
1 3
0 18
1 4
1 12
1 9
0 3
0 12
1 14
0 8
0 5
1 16
1 15
1 13
0 5
0 2
0 2
1 17
1 11
1 1
0 1
1 20
0 1
0 5
0 2
0 4
0 1
1 23
0 7
0 3
0 13
0 1
1 22
1 29
1 21
0 2
1 24
1 27
1 26
1 25
1 28
0 10
1 31
1 30
0 6
1 32
0 1
1 33
0 3
0 1
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 3
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
0 -1
1 3
0 -1
1 3
0 -1
0 -1
0 -1
1 3
0 -1
0 -1
0 -1
1 2
1 2
1 2
1 2
1 2
1 2
1 2
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #100:

score: 6
Accepted
time: 3ms
memory: 8620kb

input:

2
5000
0 10
0 3
0 10
1 1
0 1
0 1
1 4
0 2
0 6
1 2
0 3
1 6
1 8
1 3
0 6
0 9
0 3
1 10
1 9
1 5
0 1
1 12
0 3
0 1
1 14
1 11
0 5
0 3
0 1
1 16
1 17
1 15
0 9
0 4
0 1
0 12
1 21
1 20
1 18
0 1
1 19
0 2
1 22
1 23
0 6
0 3
1 24
0 1
1 26
0 3
0 2
1 28
1 27
0 2
1 29
0 1
0 1
1 30
1 7
0 1
1 32
0 2
0 3
1 33
1 34
0 1
0 4
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 10
0 -1
1 10
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 6
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 6
0 -1
1 3
0...

result:

ok both questions correct

Test #101:

score: 6
Accepted
time: 3ms
memory: 8812kb

input:

2
5000
0 1
0 4
0 4
0 2
1 1
0 6
0 1
1 5
0 5
0 6
0 2
0 3
1 10
1 9
1 4
1 7
1 3
0 6
0 10
0 5
1 11
1 12
0 4
0 1
1 14
0 11
1 16
1 15
1 2
0 3
1 17
1 13
0 4
1 18
0 5
1 19
0 5
0 2
1 21
0 8
0 1
0 2
0 2
1 22
0 8
1 26
1 23
0 1
0 1
1 28
0 2
1 20
0 1
0 1
1 31
0 2
0 4
1 30
0 1
1 32
0 2
0 3
1 34
1 29
1 35
1 24
1 33...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 1
0 -1
1 4
0 -1
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1...

result:

ok both questions correct

Test #102:

score: 6
Accepted
time: 0ms
memory: 8556kb

input:

2
5000
0 1
0 15
0 22
1 2
0 6
1 4
0 8
1 5
0 14
0 38
0 5
1 8
0 44
0 19
0 14
1 7
1 11
1 10
0 3
0 57
1 12
0 8
0 13
0 8
1 14
0 16
1 16
0 1
1 18
1 1
1 13
1 9
1 3
0 4
1 19
0 20
1 20
0 37
0 14
0 3
1 21
1 23
0 8
0 10
0 24
1 26
1 25
0 6
0 11
1 28
0 9
1 27
1 29
1 24
0 2
1 30
1 15
1 22
0 37
0 11
1 17
1 32
0 5
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #103:

score: 6
Accepted
time: 4ms
memory: 8528kb

input:

2
5000
0 4
0 4
0 27
0 20
1 2
1 3
0 18
0 34
1 6
1 5
0 3
1 7
0 8
1 4
0 5
0 4
0 1
1 10
0 41
1 12
0 42
0 2
0 3
1 14
1 8
1 13
0 8
1 16
0 8
0 41
0 8
1 18
0 1
1 17
1 20
1 15
1 9
0 8
0 31
0 5
1 23
1 22
0 22
0 18
1 24
0 19
0 13
1 27
0 12
1 28
0 5
0 12
1 30
1 29
1 26
0 38
1 31
0 3
0 33
0 5
1 32
0 18
1 35
0 3
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 4
1 4
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1...

result:

ok both questions correct

Test #104:

score: 6
Accepted
time: 0ms
memory: 8588kb

input:

2
5000
0 9
0 28
0 10
0 61
0 11
0 20
0 16
0 10
1 2
1 7
1 4
0 1
1 3
0 15
0 2
0 22
0 3
0 2
0 14
0 1
0 2
0 3
0 12
0 11
1 10
0 4
1 12
0 10
1 11
1 20
1 8
0 10
1 16
1 14
1 13
1 5
1 15
1 19
0 18
1 24
1 18
1 1
1 21
1 17
1 23
0 4
0 21
1 26
0 5
0 4
0 3
0 17
1 28
1 29
1 27
1 25
1 30
0 6
1 31
0 8
0 7
0 25
0 23
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 9
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #105:

score: 6
Accepted
time: 3ms
memory: 8784kb

input:

2
5000
0 3
0 4
0 5
1 1
0 7
1 3
0 5
0 2
1 6
0 8
0 8
1 8
0 9
1 9
0 2
1 10
1 2
0 2
0 6
0 6
1 13
0 8
0 7
0 4
0 6
1 17
1 15
1 5
1 16
1 12
0 9
1 18
0 3
0 6
0 9
1 20
0 6
0 7
1 19
1 23
1 21
1 4
1 14
0 1
0 5
1 25
1 22
0 8
1 26
1 7
0 2
1 27
0 5
1 28
0 7
0 7
0 1
0 4
0 7
0 8
1 30
1 31
1 32
0 8
1 35
1 29
1 34
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #106:

score: 6
Accepted
time: 3ms
memory: 8892kb

input:

2
5000
0 19
0 9
0 9
0 10
1 2
0 2
1 4
0 5
0 43
0 3
1 7
1 6
1 8
1 3
0 9
1 9
0 19
1 10
0 4
0 14
1 12
1 11
0 6
1 1
0 19
0 2
0 5
1 16
0 1
1 17
0 36
1 18
0 9
1 19
0 8
1 20
0 31
1 21
1 15
1 5
0 4
1 22
0 2
1 23
0 51
1 24
0 16
0 8
0 29
1 25
1 27
0 9
1 28
0 3
1 29
1 26
0 11
0 6
0 2
1 30
0 22
1 33
0 3
0 24
0 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 19
0 -1
1 9
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 19
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #107:

score: 6
Accepted
time: 0ms
memory: 8472kb

input:

2
5000
0 31
0 24
0 7
0 13
1 3
1 2
0 2
0 4
0 5
1 4
1 1
1 5
0 32
1 8
0 32
1 9
0 5
0 12
0 4
0 1
0 5
0 1
1 10
0 4
1 13
1 11
1 14
1 16
1 15
0 8
1 12
0 42
1 18
1 7
0 10
1 19
0 14
1 20
0 31
1 21
0 2
1 22
0 2
0 36
0 25
1 25
0 6
0 1
1 27
0 2
1 24
1 28
0 21
0 3
0 16
1 29
0 26
0 26
0 2
0 4
1 34
0 5
0 4
0 78
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 31
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 5
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
0 -1
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1...

result:

ok both questions correct

Test #108:

score: 6
Accepted
time: 0ms
memory: 8472kb

input:

2
5000
0 2
0 4
0 7
0 17
1 3
0 4
0 5
0 3
1 6
0 1
0 11
1 1
1 7
1 9
1 5
1 4
0 22
1 10
0 40
1 11
0 3
0 11
1 12
0 3
0 11
1 15
0 2
1 16
1 13
1 14
0 25
0 14
0 2
1 18
0 30
1 20
0 1
0 21
0 51
1 22
0 1
1 19
1 24
0 15
0 23
1 26
0 36
1 27
0 26
0 11
0 23
1 29
1 28
0 6
1 30
1 31
1 17
0 16
1 32
0 3
1 33
0 25
1 34
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #109:

score: 6
Accepted
time: 3ms
memory: 8468kb

input:

2
5000
0 4
0 11
0 9
0 11
1 2
0 6
1 5
0 4
1 6
1 3
0 4
1 1
0 6
0 5
1 9
1 8
0 4
0 1
1 10
1 11
0 4
1 12
0 2
0 2
0 17
1 13
0 10
1 15
1 14
1 16
0 2
1 17
0 5
1 18
0 19
1 19
0 8
0 4
0 9
1 21
1 22
0 2
1 23
1 20
0 3
1 24
0 2
1 25
0 3
1 26
0 8
0 12
0 3
1 29
0 19
1 28
1 30
0 8
0 10
1 32
1 31
0 8
1 27
1 33
0 3
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
0 -1
0 -1
0 -1
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #110:

score: 6
Accepted
time: 3ms
memory: 8520kb

input:

2
5000
0 7
0 2
0 8
1 2
0 8
1 4
0 9
0 4
1 5
1 1
0 2
1 7
0 2
0 2
0 1
1 9
1 3
1 8
0 9
0 6
0 10
1 13
1 11
1 12
0 2
0 26
1 14
0 4
1 16
0 15
0 13
1 17
1 18
1 15
0 1
1 19
0 8
1 20
0 12
0 5
0 9
1 21
0 18
1 22
1 24
0 7
0 1
0 10
0 2
0 4
0 3
0 5
1 25
0 7
0 1
1 27
1 31
1 28
1 29
0 1
1 33
0 2
1 23
1 32
1 30
1 34...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 7
0 -1
0 -1
0 -1
1 8
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1...

result:

ok both questions correct

Test #111:

score: 6
Accepted
time: 0ms
memory: 8476kb

input:

2
5000
0 9
0 4
0 1
0 14
0 36
1 5
1 1
1 4
0 12
0 16
1 3
1 6
0 24
1 8
0 4
0 29
0 18
0 16
0 2
0 4
0 3
1 9
1 11
0 8
1 12
0 14
1 17
1 13
1 10
0 7
0 13
1 19
1 14
1 2
0 10
1 20
1 7
1 18
0 11
1 21
0 64
1 22
0 17
1 23
0 23
0 2
0 10
1 25
0 7
0 8
1 28
1 26
1 24
0 3
0 5
1 29
0 1
0 9
0 2
1 31
0 7
0 7
1 35
1 33
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 9
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

ok both questions correct

Test #112:

score: 6
Accepted
time: 0ms
memory: 8524kb

input:

2
5000
0 15
0 12
0 54
0 19
0 8
0 14
0 39
1 3
1 4
0 3
0 9
1 1
1 5
1 8
1 6
0 13
0 13
1 11
1 10
0 26
0 2
1 12
0 14
1 14
0 5
0 31
1 16
0 25
0 28
0 8
1 18
1 19
0 19
0 9
0 41
1 22
1 17
0 8
1 23
1 21
0 17
0 7
1 25
1 20
1 13
0 8
1 26
1 2
1 15
0 2
0 8
0 1
1 29
0 18
1 30
0 5
1 31
0 4
1 32
1 27
1 9
1 7
0 15
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 15
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #113:

score: 6
Accepted
time: 3ms
memory: 8532kb

input:

2
5000
0 484
0 472
0 474
1 2
0 496
0 490
0 499
0 496
0 495
1 6
1 4
0 498
1 9
1 8
0 497
1 10
1 3
0 497
0 493
0 498
0 493
1 11
1 13
0 490
1 12
1 14
1 15
0 479
1 16
0 500
0 481
1 18
0 498
1 19
0 500
1 17
0 500
1 21
0 496
1 22
0 492
0 493
0 494
0 494
0 489
1 26
1 23
0 500
0 497
1 27
1 24
0 500
0 493
1 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 484
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #114:

score: 6
Accepted
time: 3ms
memory: 8588kb

input:

2
5000
0 427
0 497
0 479
1 2
0 491
1 3
0 490
0 482
0 496
1 5
0 498
0 491
0 491
1 8
1 7
1 9
1 6
1 4
0 500
1 11
0 490
1 12
0 494
0 487
1 13
1 1
0 484
1 15
0 492
1 16
0 498
1 17
0 486
1 10
0 500
1 19
0 489
0 481
1 21
0 487
1 20
1 22
0 490
1 23
0 496
1 24
0 496
0 481
0 486
1 26
1 14
1 18
0 493
0 493
1 2...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 427
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 491
0 -1
1 491
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 487
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #115:

score: 6
Accepted
time: 3ms
memory: 8552kb

input:

2
5000
0 500
0 497
0 495
1 1
0 495
1 3
0 499
0 495
0 497
0 493
1 7
1 5
0 500
0 497
0 500
0 499
1 10
1 12
0 498
0 497
0 500
0 499
1 13
1 16
1 14
0 500
0 499
0 499
0 496
1 20
1 9
0 499
0 497
1 22
0 500
0 493
0 495
1 24
0 487
1 23
1 21
0 494
1 17
1 25
1 11
0 500
1 28
0 496
0 496
1 30
0 497
1 31
1 6
0 4...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 500
0 -1
0 -1
0 -1
1 495
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1...

result:

ok both questions correct

Test #116:

score: 6
Accepted
time: 0ms
memory: 8472kb

input:

2
5000
0 8
0 6
0 2
1 2
0 2
0 3
1 5
1 4
0 9
0 8
1 7
1 6
0 6
1 8
0 3
0 3
1 10
1 1
0 8
0 2
1 11
0 6
0 3
0 1
1 12
1 14
0 9
0 1
0 2
0 7
1 16
1 18
1 13
0 5
0 6
0 5
0 3
1 20
0 5
1 22
1 24
0 9
0 4
1 25
0 3
1 27
0 2
0 5
1 28
1 29
1 23
0 7
0 9
0 4
0 4
0 4
0 3
1 33
0 8
1 35
1 34
0 3
0 9
1 37
0 9
0 2
1 39
1 30
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 8
0 -1
0 -1
0 -1
1 2
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #117:

score: 6
Accepted
time: 3ms
memory: 8780kb

input:

2
5000
0 499
0 500
0 496
1 3
0 497
0 500
1 4
0 497
1 6
1 2
0 499
1 1
0 500
0 500
1 8
1 5
0 497
1 10
0 497
1 11
0 496
1 12
0 500
0 497
0 500
0 500
0 487
1 16
0 499
1 13
1 18
1 15
1 7
1 14
0 499
1 19
0 500
0 499
1 21
0 500
1 22
1 20
0 500
0 500
0 500
1 25
1 23
1 24
0 500
1 26
0 500
0 499
1 28
1 27
0 5...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 499
0 -1
0 -1
0 -1
0 -1
0 -1
1 500
0 -1
1 500
0 -1
1 499
0 -1
1 500
1 500
1 500
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 500
0 -1
1 500
1 500
1 500
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 500
0 -1
1 500
1 500
1 500
0 -1
1 500
...

result:

ok both questions correct

Test #118:

score: 6
Accepted
time: 3ms
memory: 8520kb

input:

2
5000
0 499
0 498
0 498
1 1
0 496
0 497
0 499
1 2
1 4
1 5
0 500
1 7
0 496
0 498
0 500
1 9
0 499
1 11
0 500
1 12
0 500
0 500
1 14
0 497
1 15
1 10
0 496
0 499
0 499
0 500
0 500
0 498
0 500
1 16
1 17
0 489
0 499
1 22
1 19
0 500
1 25
0 497
0 494
1 27
1 18
0 495
1 28
0 498
1 29
1 24
1 21
0 495
1 30
1 23...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 499
0 -1
1 498
1 498
1 498
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #119:

score: 6
Accepted
time: 0ms
memory: 8552kb

input:

2
5000
0 498
0 500
0 498
0 497
0 500
0 500
1 2
0 499
1 5
1 6
1 4
0 499
0 500
1 9
1 8
1 7
0 498
1 3
0 500
0 500
1 11
0 499
1 13
1 12
0 500
1 14
0 499
1 15
0 499
1 16
0 499
0 493
1 17
0 498
0 500
1 1
1 10
0 498
0 500
1 22
1 21
1 20
0 500
1 23
0 500
1 24
0 499
0 500
1 25
1 26
0 500
0 499
0 500
1 29
1 2...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 498
0 -1
1 498
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 498
0 -1
0 -1
0 -1
1 498
1 498
1 498
1 498
1 498
0 -1
1 498
0 -1
1 498
1 498
1 498
1 498
1 498
1 498
1 498
1 498
1 498
0 -1
1 498
1 498
1 498
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #120:

score: 6
Accepted
time: 3ms
memory: 8556kb

input:

2
5000
0 5
0 1
0 2
0 7
1 1
0 4
0 1
1 3
1 5
1 4
0 2
0 1
0 1
1 7
1 2
0 2
0 1
0 6
0 1
0 2
1 14
0 1
0 1
1 16
1 12
0 1
1 15
0 1
0 1
0 1
1 10
0 1
1 21
1 11
1 13
1 17
1 9
0 1
1 22
1 18
0 2
1 20
1 23
0 3
0 2
0 1
1 24
1 25
0 2
0 1
1 28
1 27
1 19
1 8
0 1
1 29
0 1
0 5
0 2
1 31
0 1
1 33
1 30
1 32
0 2
1 34
0 1
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 5
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
...

result:

ok both questions correct

Test #121:

score: 6
Accepted
time: 3ms
memory: 8588kb

input:

2
5000
0 1
0 3
0 2
0 1
1 3
1 1
0 1
0 2
1 4
0 1
1 2
0 1
0 2
0 3
1 10
0 5
0 1
1 11
1 8
0 1
0 6
1 14
0 2
1 9
1 6
0 2
0 1
1 17
1 16
0 2
1 18
0 2
0 1
0 2
0 1
0 1
1 20
0 1
0 1
1 24
1 25
1 23
1 15
1 21
0 2
1 26
1 12
1 19
0 1
1 27
0 1
0 7
0 1
1 28
0 1
0 2
0 3
0 1
1 32
1 31
0 1
0 3
1 35
0 3
1 33
1 34
1 37
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 1
0 -1
0 -1
0 -1
1 1
0 -1
1 1
0 -1
0 -1
0 -1
1 1
1 1
1 1
0 -1
1 1
0 -1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 ...

result:

ok both questions correct

Test #122:

score: 6
Accepted
time: 3ms
memory: 8528kb

input:

2
5000
0 4999
0 4999
0 4999
0 4999
0 1459
0 780
0 4999
0 4999
0 4999
0 4999
0 4999
0 1646
0 4999
0 4999
0 1909
0 1645
0 4999
0 4999
0 1271
0 49
0 4999
0 1765
0 2471
0 997
0 4999
0 515
0 797
0 4999
0 4999
0 4999
0 4999
0 4999
0 4999
0 4999
0 4999
0 4999
0 4999
0 4999
0 1948
0 4999
0 1938
0 4999
0 499...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
...

result:

ok both questions correct

Test #123:

score: 6
Accepted
time: 0ms
memory: 8816kb

input:

2
5000
0 648
1 1
0 2926
1 2
0 1100
1 3
0 3813
1 4
0 3649
1 5
0 935
1 6
0 205
1 7
0 2370
1 8
0 2844
1 9
0 1517
1 10
0 1826
1 11
0 807
1 12
0 722
1 13
0 4953
1 14
0 1821
1 15
0 3989
1 16
0 2453
1 17
0 1279
1 18
0 2650
1 19
0 4708
1 20
0 4677
1 21
0 409
1 22
0 4516
1 23
0 2550
1 24
0 2990
1 25
0 3107
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 0
1 648
0 -1
1 2926
0 -1
1 1100
0 -1
1 3813
0 -1
1 3649
0 -1
1 935
0 -1
1 205
0 -1
1 2370
0 -1
1 2844
0 -1
1 1517
0 -1
1 1826
0 -1
1 807
0 -1
1 722
0 -1
1 4953
0 -1
1 1821
0 -1
1 3989
0 -1
1 2453
0 -1
1 1279
0 -1
1 2650
0 -1
1 4708
0...

result:

ok both questions correct

Test #124:

score: 6
Accepted
time: 0ms
memory: 8812kb

input:

2
5000
0 2309
0 2174
0 1880
0 2089
0 415
0 1149
0 464
0 2335
0 4999
0 1682
0 2436
0 4999
1 4
1 1
0 4999
0 4999
0 4999
1 10
0 4999
1 2
0 1071
0 2147
1 14
0 4999
0 2384
1 19
0 4999
0 4999
0 395
0 4999
0 150
0 4999
0 4999
0 4999
0 2180
1 24
0 4999
0 8
0 4999
1 31
0 1018
0 4999
0 1628
0 4999
1 33
0 2398...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 2309
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 4999
0 ...

result:

ok both questions correct

Test #125:

score: 6
Accepted
time: 3ms
memory: 8884kb

input:

2
5000
0 2
0 4
0 2
0 4
1 2
0 1
1 5
0 1
1 1
0 1
1 6
0 3
0 3
0 2
0 3
1 8
1 9
0 4
1 3
0 3
0 4
1 14
0 1
1 15
0 3
1 16
1 7
1 11
0 1
0 3
0 4
0 3
1 17
0 3
1 21
0 1
0 4
0 2
1 23
1 19
0 1
1 25
0 4
0 3
1 27
0 3
0 1
1 29
1 26
0 4
1 30
0 3
1 31
1 22
1 20
0 2
1 32
1 24
0 2
1 28
0 4
1 34
0 3
0 3
0 1
1 35
1 36
1 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 2
0 -1
1 2
0 -1
1 2
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #126:

score: 6
Accepted
time: 3ms
memory: 8556kb

input:

2
5000
0 2
0 1
0 2
0 4
1 1
1 2
0 3
0 3
1 6
1 3
0 2
0 4
1 8
0 1
0 4
0 3
0 2
1 4
0 1
1 7
0 4
1 5
0 1
0 1
1 16
0 1
1 15
1 9
1 12
1 13
1 17
0 4
1 18
0 4
0 1
1 19
1 20
1 14
0 4
1 21
0 1
0 3
0 3
1 22
1 11
0 4
0 4
0 4
1 27
1 26
1 25
1 10
0 4
1 28
0 2
1 29
0 3
1 30
0 2
1 31
0 4
1 32
0 4
0 1
0 2
0 4
1 36
0 2...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 2
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
1 4
1 4
1 4
1 4
0 -1
1 4
0 -1
1 4
0 -1
0 -1
0 -1
1 3
1 3
1 3
0 -1
1 4
1 4
1 4
0...

result:

ok both questions correct

Test #127:

score: 6
Accepted
time: 3ms
memory: 8780kb

input:

2
5000
0 3
0 7
0 8
1 1
0 1
1 4
0 8
1 5
0 7
1 6
0 8
0 2
1 7
1 8
0 4
1 3
0 7
0 8
1 11
1 10
0 5
0 5
0 2
0 9
1 12
1 9
1 2
1 14
0 1
0 2
0 9
0 6
0 4
1 16
1 20
0 1
0 5
0 7
0 9
0 9
0 7
1 23
0 4
0 7
0 1
1 26
0 1
0 3
0 5
1 21
0 6
1 25
1 29
1 24
0 4
1 34
0 8
0 4
1 36
1 31
1 27
1 22
0 7
1 37
0 8
1 38
1 17
1 30
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
1 8
0 -1
1 7
0 -1
1 8
0 -1
0 -1
0 -1
0 -1
0 -1
1 7
0 -1
1 7
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #128:

score: 6
Accepted
time: 0ms
memory: 8452kb

input:

2
5000
0 6
0 8
0 2
0 8
0 6
1 3
1 2
0 3
0 7
1 7
1 6
0 6
1 8
1 1
0 1
0 3
0 4
0 3
1 9
1 12
0 2
0 2
1 14
1 13
1 10
0 3
1 15
1 5
0 5
0 1
1 16
0 6
0 7
0 5
1 19
0 8
0 4
0 1
0 6
1 22
1 21
0 3
1 23
1 25
1 20
0 3
1 26
1 11
1 24
0 5
0 6
1 27
0 8
1 29
0 8
0 8
1 30
0 6
1 31
1 4
0 3
1 33
0 1
1 34
0 5
0 2
0 5
0 2
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 6
0 -1
0 -1
0 -1
0 -1
0 -1
1 6
0 -1
0 -1
0 -1
1 6
1 6
1 6
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #129:

score: 6
Accepted
time: 3ms
memory: 8536kb

input:

2
5000
0 2
0 6
0 6
1 2
0 5
0 7
0 8
1 1
1 4
0 6
0 3
0 5
1 9
0 5
1 5
0 6
1 7
1 8
0 6
1 12
1 6
0 1
1 13
0 6
0 5
0 8
0 2
1 14
1 15
0 1
0 4
0 5
1 17
0 3
1 19
0 8
0 1
1 22
0 6
1 24
1 18
1 16
0 4
0 1
0 8
1 25
0 7
1 27
1 26
1 28
0 5
0 4
0 6
1 30
0 1
0 4
0 6
1 32
1 34
1 33
0 3
0 7
1 36
0 1
0 6
1 37
0 8
1 39
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 2
0 -1
1 6
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 6
0 -1
1 6
0 -1
1 6
1 6
1 6
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

ok both questions correct

Test #130:

score: 6
Accepted
time: 3ms
memory: 8524kb

input:

2
5000
0 30
0 1
0 21
1 2
0 19
1 3
0 29
1 5
0 12
1 6
0 25
0 22
0 19
0 15
1 10
0 27
1 8
0 16
1 12
1 7
0 24
1 1
0 27
0 9
1 14
0 23
1 4
1 16
1 11
0 16
1 9
0 28
1 18
1 15
0 18
0 18
0 32
1 19
0 2
0 18
0 14
0 25
0 20
1 22
0 32
1 23
1 27
0 22
0 22
0 6
1 29
0 3
0 6
1 32
0 5
1 31
1 33
0 25
1 21
0 24
0 9
1 35
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 30
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #131:

score: 6
Accepted
time: 3ms
memory: 8472kb

input:

2
5000
0 10
0 7
0 9
1 3
0 18
0 31
1 1
0 4
0 31
1 5
1 2
0 3
1 6
1 7
0 16
0 31
1 9
0 27
0 8
0 16
1 10
0 7
1 13
0 30
0 2
1 16
0 9
0 7
0 9
1 17
0 18
1 20
1 19
0 13
1 21
0 16
0 2
0 16
0 20
1 24
0 17
1 25
0 28
1 27
1 23
0 25
0 3
1 22
1 28
1 29
1 8
1 12
1 26
0 7
0 26
1 30
1 31
1 18
1 4
0 1
0 20
0 26
0 31
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 10
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #132:

score: 6
Accepted
time: 0ms
memory: 8572kb

input:

2
5000
0 3
0 2
0 3
1 2
0 3
0 4
1 4
0 4
0 1
0 2
0 3
1 6
1 8
0 1
0 3
0 1
1 7
0 4
0 3
0 2
1 12
0 2
1 11
0 2
0 1
1 17
1 10
0 3
1 19
1 13
1 15
0 1
1 20
1 5
1 1
1 14
1 9
1 3
0 1
0 3
0 2
1 22
0 2
1 23
0 3
1 25
0 3
0 4
1 27
0 3
1 24
1 26
1 21
1 28
0 1
1 29
0 3
0 3
0 1
1 31
1 18
1 30
0 2
0 4
0 3
1 35
0 2
1 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 3
0 -1
1 3
1 3
1 3
1 3
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
0 -1
1 3
0 -1
1 3
0 -1
1 3
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
0 -1
1 3
1 3
1 3
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

ok both questions correct

Test #133:

score: 6
Accepted
time: 0ms
memory: 8584kb

input:

2
5000
0 3
0 4
0 3
1 2
0 3
1 4
0 3
0 2
1 6
0 4
0 1
1 5
1 3
1 1
0 3
1 9
0 4
1 10
0 2
0 1
0 3
0 4
1 11
0 4
1 14
1 12
0 4
0 4
0 4
0 3
0 3
1 16
0 3
1 13
1 19
0 1
1 22
0 1
1 23
1 21
0 4
0 4
1 17
1 18
0 3
1 15
1 25
0 1
0 4
0 1
1 29
1 28
1 27
1 7
1 20
0 2
1 30
0 4
0 3
1 32
1 31
1 24
0 2
0 4
0 2
0 2
1 35
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 3
0 -1
1 3
1 3
1 3
1 3
1 3
1 3
1 3
1 3
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
1 4
1 4
1 4
1 4
0 -1
0 -1
0 -1
1 4
0 -1
1 4
0 -1
1 4
1 4
1 4
1 4
1 4
1 4
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #134:

score: 6
Accepted
time: 3ms
memory: 8556kb

input:

2
5000
0 5
0 6
0 4
0 4
1 4
0 4
0 4
1 6
0 6
0 6
1 5
1 3
1 2
1 7
0 7
0 3
0 6
0 2
1 12
1 9
0 1
0 7
0 7
1 14
1 15
0 4
1 11
1 10
1 13
0 8
1 17
1 8
0 1
0 4
1 18
0 8
0 2
0 5
0 3
1 21
1 22
1 20
0 8
0 5
1 24
0 2
0 6
1 27
1 26
1 25
1 19
1 23
0 5
0 5
1 28
0 4
1 29
1 30
0 7
0 2
1 31
1 32
0 3
1 33
0 5
1 34
0 6
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 5
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
0 -1
0 -1
0 -1
1 6
1 6
1 6
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #135:

score: 6
Accepted
time: 3ms
memory: 8524kb

input:

2
5000
0 1
0 3
0 8
0 4
0 8
0 7
1 2
1 3
0 8
1 6
0 3
0 8
0 6
1 9
1 10
1 1
0 1
1 7
0 7
1 12
0 5
0 1
0 3
1 13
1 4
1 15
1 8
0 5
1 16
1 5
0 4
0 6
0 1
0 1
0 3
0 4
1 17
1 19
1 20
0 1
1 23
1 18
0 2
0 4
0 5
1 24
1 25
1 26
0 8
0 8
0 4
1 27
1 22
1 28
1 29
1 21
0 6
0 2
0 5
0 6
1 32
1 33
1 31
1 30
0 2
0 2
1 35
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
1 1
1 1
1 1
0 -1
1 1
1 1
1 1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #136:

score: 6
Accepted
time: 3ms
memory: 8524kb

input:

2
5000
0 28
0 15
0 15
0 1
0 21
0 8
0 24
0 31
1 5
0 12
0 3
1 9
1 1
1 6
0 22
0 10
1 12
0 8
0 15
1 14
1 7
0 12
0 31
1 16
0 17
0 12
1 18
0 23
1 15
0 17
0 19
0 25
0 2
0 2
1 22
1 20
0 18
1 25
0 1
1 26
0 24
1 27
1 11
1 21
1 24
1 8
1 19
1 10
0 24
0 21
0 13
1 30
1 29
1 28
1 3
1 13
1 2
0 19
0 2
1 31
1 32
0 2
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 28
0 -1
1 15
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #137:

score: 6
Accepted
time: 3ms
memory: 8532kb

input:

2
5000
0 9
0 21
0 3
1 1
0 10
1 3
0 8
1 5
0 9
0 20
0 18
1 7
1 8
1 2
0 22
0 32
0 4
1 9
0 26
0 1
1 13
1 11
1 12
1 10
0 1
1 14
0 12
1 15
0 15
0 15
1 17
0 12
1 18
1 16
0 14
0 21
0 25
0 5
1 22
1 19
1 20
1 21
0 6
1 23
0 20
0 17
0 18
1 26
0 32
0 2
0 8
1 28
1 25
0 20
1 24
1 30
1 27
0 4
1 29
0 20
1 32
0 14
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 9
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #138:

score: 6
Accepted
time: 3ms
memory: 8528kb

input:

2
5000
0 8
0 10
0 6
1 1
0 11
1 2
0 3
1 5
0 15
0 8
0 6
0 4
1 6
1 7
0 9
1 8
1 10
0 1
1 11
0 2
1 12
1 4
0 9
1 13
0 15
0 5
0 2
1 15
0 13
1 14
1 16
0 13
0 3
1 18
1 19
1 9
0 13
1 20
0 1
0 10
0 4
0 10
0 11
1 25
0 6
1 26
1 22
0 13
1 27
1 24
0 10
1 28
0 2
1 29
0 11
0 14
1 30
0 3
1 32
0 12
1 31
1 33
1 21
0 6
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 8
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 13
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #139:

score: 6
Accepted
time: 0ms
memory: 8520kb

input:

2
5000
0 1
0 2
0 2
1 1
0 4
1 4
0 4
0 1
1 5
0 4
0 4
1 8
0 4
1 9
0 4
0 3
0 4
1 11
1 12
1 10
1 6
0 2
0 3
0 3
1 14
0 3
0 1
1 16
0 1
1 15
1 13
1 7
0 2
0 1
1 19
0 3
1 20
0 3
1 22
0 4
1 23
1 21
0 3
1 24
0 4
1 25
0 3
0 4
1 26
0 3
1 28
1 27
0 4
1 29
0 1
1 30
0 4
1 31
0 1
1 32
1 2
0 2
0 3
1 34
1 33
0 4
0 2
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 1
0 -1
1 2
1 2
1 2
1 2
1 2
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
1 2
1 2
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1...

result:

ok both questions correct

Test #140:

score: 6
Accepted
time: 3ms
memory: 8580kb

input:

2
5000
0 2
0 4
0 2
1 2
0 4
1 3
0 1
0 4
0 3
0 2
0 1
1 5
1 6
0 4
0 2
0 2
0 4
0 2
1 14
0 3
1 12
0 1
1 15
0 2
1 7
0 1
1 9
1 11
0 3
0 4
1 19
0 4
0 1
1 21
0 1
1 4
1 18
0 3
1 24
1 23
1 1
1 13
0 3
0 1
0 2
0 1
0 4
1 28
0 1
1 30
0 3
0 1
0 1
1 33
0 3
1 31
1 32
0 2
1 35
0 4
0 4
1 34
1 25
0 1
0 3
1 38
1 36
0 2
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 2
0 -1
1 2
1 2
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #141:

score: 6
Accepted
time: 3ms
memory: 8620kb

input:

2
5000
0 3
0 2
0 3
0 6
1 4
0 8
1 2
0 15
1 6
0 3
1 7
1 5
0 10
0 12
1 9
0 6
1 10
1 3
0 13
0 5
0 11
1 12
0 13
0 13
1 14
1 15
1 1
1 8
0 11
0 2
0 9
1 18
1 17
1 16
0 14
1 19
0 12
0 10
1 20
0 5
1 21
1 22
0 4
1 23
0 13
0 7
1 24
0 7
1 26
0 13
0 1
0 8
1 28
0 5
1 30
1 25
0 13
0 3
1 32
0 12
1 33
0 5
0 11
0 11
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 3
0 -1
1 3
0 -1
1 3
0 -1
1 3
0 -1
1 3
1 3
1 3
1 3
1 3
0 -1
1 3
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 11
0 -1
0 -1
0 -1
1 11
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 13
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #142:

score: 6
Accepted
time: 0ms
memory: 8584kb

input:

2
5000
0 13
0 1
0 2
0 11
0 9
0 10
1 3
1 2
0 2
0 9
0 3
0 8
0 13
0 7
0 9
1 11
1 13
1 7
1 12
1 4
0 3
0 10
0 8
0 5
0 4
1 17
0 13
0 1
0 8
0 8
0 12
1 19
0 15
0 1
0 3
1 24
0 15
1 26
0 9
1 27
0 14
0 15
1 21
1 22
1 16
0 8
1 31
0 13
1 32
1 28
1 15
1 23
1 25
0 3
1 33
0 15
0 7
0 2
0 1
1 37
1 36
1 35
0 11
1 38
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 13
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Subtask #3:

score: 18
Accepted

Test #143:

score: 18
Accepted
time: 18ms
memory: 8580kb

input:

3
50000
0 2
0 1
0 1
1 1
0 4
1 2
0 1
1 4
0 3
1 6
0 4
1 7
0 1
0 4
1 3
1 8
0 3
0 1
0 2
0 3
1 10
1 13
0 3
0 2
0 1
0 2
1 14
1 17
0 4
0 1
1 18
1 15
1 16
0 4
0 1
1 20
1 21
1 19
1 11
1 5
0 1
0 4
1 23
1 9
0 1
1 24
0 3
0 1
1 25
1 26
0 3
0 3
1 27
1 28
0 1
1 29
0 4
0 4
0 1
1 31
1 30
0 1
1 33
1 32
0 4
0 4
1 34
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 2
0 -1
1 1
1 1
1 1
0 -1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
1 1
1 1
0 -1
1 1
1 1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
1 1
0 -1
0 ...

result:

ok both questions correct

Test #144:

score: 18
Accepted
time: 20ms
memory: 8832kb

input:

3
50000
0 2
0 1
0 2
1 1
0 2
1 3
0 1
1 5
0 1
1 6
0 1
1 7
0 1
1 8
0 1
0 2
0 1
0 1
1 9
1 12
0 2
1 13
1 2
0 1
0 1
0 2
1 15
1 4
1 14
1 16
0 2
0 1
1 17
1 18
0 2
1 19
0 1
1 20
0 1
1 21
0 1
0 1
0 1
1 22
0 1
0 2
0 2
0 1
1 28
0 1
1 26
1 24
1 25
1 27
0 2
1 30
1 23
1 29
0 1
1 31
0 1
1 10
0 2
0 2
1 33
0 2
1 34
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 2
0 -1
1 2
0 -1
1 2
0 -1
1 1
0 -1
1 1
0 -1
1 1
0 -1
1 1
0 -1
1 1
0 -1
1 1
1 1
1 1
0 -1
1 2
0 -1
1 2
0 -1
1 1
0 -1
1 2
0 -1
1 2
0 -1
1 2
0 -1
1 1
0 -1
1 2
0 -1
1 1
0 -1
1 1
0 -1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
...

result:

ok both questions correct

Test #145:

score: 18
Accepted
time: 19ms
memory: 8548kb

input:

3
50000
0 4
0 2
0 2
0 2
0 1
0 1
0 1
0 1
0 1
0 2
1 10
1 1
1 3
0 1
0 3
1 2
1 4
1 6
0 1
1 11
1 13
0 1
1 8
0 1
0 1
0 3
0 4
0 1
1 15
1 17
0 3
1 20
0 1
1 21
1 14
1 12
0 2
0 3
1 22
1 23
1 5
0 1
1 19
1 7
1 9
0 1
1 25
0 1
1 26
1 24
0 1
0 3
0 1
0 1
1 29
0 1
0 2
1 31
1 32
1 30
0 1
0 2
1 34
0 1
0 1
0 3
1 33
0 1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 4
0 -1
1 2
1 2
1 2
0 -1
0 -1
0 -1
1 1
0 -1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
0 -1
1 1
0 -1
1 1
1 1
1 1
1 1
...

result:

ok both questions correct

Test #146:

score: 18
Accepted
time: 15ms
memory: 8556kb

input:

3
50000
0 3
0 2
0 4
0 3
1 3
0 1
1 1
1 4
0 3
0 2
1 7
0 1
0 3
0 2
1 10
0 1
1 9
0 1
1 12
1 6
0 3
0 4
1 2
0 1
0 2
1 16
0 1
0 1
1 17
0 3
1 13
1 14
1 19
0 1
1 20
1 18
0 1
0 2
0 2
1 21
1 22
0 2
1 24
0 2
0 2
1 25
0 1
1 26
0 4
0 1
1 27
1 29
0 1
1 23
1 30
1 28
1 8
1 5
0 2
1 11
0 1
1 32
0 1
0 1
0 1
1 34
1 35
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 3
0 -1
0 -1
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
1 1
1 1
1 1
1 1
0 -1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
...

result:

ok both questions correct

Test #147:

score: 18
Accepted
time: 13ms
memory: 8608kb

input:

3
50000
0 2
0 1
0 3
1 3
0 1
1 2
0 1
1 5
0 3
1 6
0 6
1 1
0 2
0 3
1 9
1 7
0 2
1 4
0 1
1 11
0 7
1 12
0 2
1 13
0 1
1 14
0 8
1 15
0 8
0 2
1 17
1 16
0 1
1 18
0 7
1 19
0 5
1 20
0 1
1 21
0 4
0 7
0 1
1 24
1 23
1 22
0 4
1 25
0 1
1 26
0 7
1 27
0 3
0 4
0 9
1 30
1 28
0 1
0 4
1 31
1 29
0 3
0 3
1 34
1 32
0 1
1 35
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 2
0 -1
0 -1
0 -1
1 1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
0 -1
0 -1
0 -1
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
0 -...

result:

ok both questions correct

Test #148:

score: 18
Accepted
time: 17ms
memory: 8548kb

input:

3
50000
0 5
0 3
0 3
0 5
1 1
0 5
0 3
0 3
0 1
1 7
1 4
1 8
1 2
0 4
0 2
0 7
1 9
0 1
0 2
1 12
1 11
1 13
1 6
1 5
0 2
1 14
0 2
0 1
1 16
0 3
0 8
1 18
0 5
1 19
1 3
1 17
0 2
0 6
1 20
1 21
0 5
1 22
0 1
0 3
1 24
0 1
0 1
1 25
0 7
1 27
0 1
0 9
1 26
0 5
1 30
0 4
1 31
0 4
1 32
1 29
1 23
0 1
0 1
0 1
0 5
0 5
0 2
1 34...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 5
0 -1
1 3
0 -1
1 3
0 -1
1 3
1 3
1 3
0 -1
1 3
1 3
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
0 -1
1 2
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
0 -1
1 2
0 -1
1 1
0 -1
0 -1
0 -1
1 1
...

result:

ok both questions correct

Test #149:

score: 18
Accepted
time: 17ms
memory: 8836kb

input:

3
50000
0 11
0 7
0 4
0 6
1 3
0 5
0 2
0 5
1 5
1 7
0 3
1 8
0 11
1 9
1 1
1 6
0 3
0 13
0 13
0 11
1 12
0 5
1 11
1 13
0 6
0 3
1 15
1 10
1 16
1 14
0 4
0 2
0 1
0 1
0 6
0 6
1 17
0 8
1 19
1 21
0 1
1 24
1 20
0 3
1 25
0 8
1 22
0 8
0 9
1 27
0 6
1 29
0 1
1 30
1 28
1 23
0 8
1 18
1 4
0 7
0 4
0 9
0 9
1 34
0 9
0 1
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 11
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #150:

score: 18
Accepted
time: 17ms
memory: 8604kb

input:

3
50000
0 2
0 9
0 2
0 12
1 1
1 2
0 4
1 5
0 3
1 6
0 8
1 7
0 1
1 4
0 10
0 10
1 10
1 9
0 9
0 2
0 12
0 9
1 13
1 12
1 14
0 3
1 15
0 3
0 1
1 17
0 11
0 4
1 16
1 18
0 10
1 20
0 12
1 21
1 19
0 5
0 8
0 2
1 23
0 8
0 4
1 25
1 26
1 22
1 11
1 8
0 3
1 27
0 2
0 3
0 4
1 29
1 30
0 10
0 7
0 9
1 32
0 3
0 2
0 13
1 31
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 2
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

ok both questions correct

Test #151:

score: 18
Accepted
time: 17ms
memory: 8648kb

input:

3
50000
0 9
0 25
0 5
0 25
0 14
0 25
0 3
0 3
0 17
0 11
0 9
1 7
1 4
0 12
0 24
0 20
1 14
0 23
1 6
1 3
1 2
1 1
1 12
1 9
0 3
0 7
0 5
1 18
1 17
1 5
0 19
0 2
1 20
1 19
1 15
1 10
0 14
0 5
0 2
0 17
1 23
1 21
0 15
1 25
0 4
0 18
0 6
0 10
0 2
1 30
1 27
1 29
1 28
0 1
1 24
0 2
1 31
0 10
0 22
1 34
1 32
0 22
1 35
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 9
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #152:

score: 18
Accepted
time: 17ms
memory: 8832kb

input:

3
50000
0 21
0 13
0 6
0 12
0 5
1 1
0 16
1 3
0 8
0 4
1 7
1 2
1 4
0 1
1 8
0 2
1 5
1 9
0 17
0 8
0 6
0 2
1 12
1 13
0 2
1 15
0 11
1 16
1 14
0 4
0 8
1 18
1 17
0 5
0 20
1 20
0 29
0 10
1 21
1 11
1 22
0 4
1 6
0 29
0 8
1 25
1 24
0 8
1 26
1 19
0 17
1 27
0 21
1 28
0 14
1 29
0 12
0 3
0 2
1 32
0 6
0 3
1 30
1 34
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 21
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #153:

score: 18
Accepted
time: 15ms
memory: 8552kb

input:

3
50000
0 3
0 4
0 4
0 2
1 1
1 2
0 4
1 5
0 4
0 4
0 4
0 2
0 4
0 3
0 4
0 3
1 8
0 4
1 9
1 11
1 3
0 3
0 4
0 4
1 15
0 4
0 2
1 19
1 16
1 18
1 17
0 3
1 20
1 13
0 2
0 3
1 22
1 10
0 4
1 23
0 4
1 6
1 14
0 2
1 25
1 4
0 3
1 26
0 4
0 3
1 28
1 27
1 21
0 4
0 3
0 4
0 4
1 32
0 2
0 2
0 3
0 2
1 29
0 4
0 3
0 4
1 39
0 4
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 3
0 -1
1 4
0 -1
1 4
0 -1
1 4
0 -1
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
0 -1
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 ...

result:

ok both questions correct

Test #154:

score: 18
Accepted
time: 18ms
memory: 8536kb

input:

3
50000
0 3
0 2
0 1
1 3
0 3
1 4
0 2
1 5
0 3
1 6
0 3
1 7
0 2
1 8
0 1
0 2
0 2
1 10
1 11
1 9
0 2
1 12
0 2
0 4
0 2
0 2
0 2
0 4
0 2
1 18
1 17
1 13
0 1
0 2
0 3
1 22
0 2
0 3
1 16
1 15
1 19
1 23
1 14
0 1
1 21
1 2
1 20
1 25
0 4
1 26
0 2
0 2
0 4
1 27
1 29
1 28
0 1
1 30
0 1
1 31
0 4
0 1
1 32
1 33
0 2
1 34
0 2
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 3
0 -1
0 -1
0 -1
1 3
0 -1
1 2
0 -1
1 3
0 -1
1 3
0 -1
1 2
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
1 2
0 -1
1 2
0 -1
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
1 3
1 3
1 3
1 3
0 -1
...

result:

ok both questions correct

Test #155:

score: 18
Accepted
time: 19ms
memory: 8908kb

input:

3
50000
0 4
0 4
0 4
1 3
0 4
1 1
0 3
0 4
0 3
1 5
0 4
0 4
0 1
0 2
0 4
1 9
0 4
0 4
0 4
1 14
1 11
1 4
0 4
1 16
1 13
1 2
1 7
1 15
1 10
0 3
1 17
1 8
0 3
0 4
1 19
1 18
0 3
1 20
0 3
0 3
1 22
0 4
1 21
0 4
1 24
0 4
0 4
1 25
1 26
0 3
1 27
1 23
0 3
0 3
0 4
1 29
0 4
0 4
1 28
1 32
1 30
0 4
0 4
0 4
0 2
1 35
0 4
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
0 -1
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
0 -1
1 4
1 4
1 4
1...

result:

ok both questions correct

Test #156:

score: 18
Accepted
time: 17ms
memory: 8812kb

input:

3
50000
0 7
0 6
0 8
1 3
0 9
1 4
0 6
0 6
0 8
1 1
1 5
0 8
0 8
1 9
0 6
1 10
1 6
0 8
0 8
0 8
0 8
0 9
1 15
1 11
0 9
1 12
1 14
0 8
0 9
1 18
0 8
0 9
1 19
1 16
0 9
1 17
0 8
0 6
0 8
0 8
1 24
1 23
1 13
0 9
1 26
0 9
0 8
1 27
1 28
1 20
0 4
1 29
0 6
1 30
0 2
0 9
1 32
0 4
0 6
1 31
0 9
1 34
0 4
0 4
1 36
0 9
1 37
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 7
0 -1
0 -1
0 -1
0 -1
0 -1
1 6
1 6
1 6
1 6
1 6
0 -1
1 8
0 -1
1 6
0 -1
1 8
1 8
1 8
1 8
1 8
1 8
1 8
1 8
1 8
1 8
1 8
1 8
1 8
1 8
1 8
1 8
1 8
1 8
1 8
0 -1
1 8
0 -1
1 8
1 8
1 8
1 8
1 8
0 -1
1 8
0 -1
1 8
1 8
1 8
1 8
1 8
1 8
1 8
1 8
1 8...

result:

ok both questions correct

Test #157:

score: 18
Accepted
time: 14ms
memory: 8800kb

input:

3
50000
0 7
0 8
0 8
0 9
0 9
1 2
1 5
0 9
1 1
0 6
1 7
0 9
1 8
0 7
0 3
1 10
1 6
1 4
0 8
1 11
0 5
1 12
0 9
1 13
0 8
1 3
0 5
0 4
0 8
1 15
0 8
1 18
0 8
0 5
1 19
1 16
0 9
0 9
0 8
0 7
0 7
1 24
0 5
0 9
1 27
0 7
0 9
1 28
1 23
1 22
0 8
1 30
0 9
1 29
0 7
0 7
1 33
0 8
0 7
0 7
0 9
0 8
1 34
1 32
0 8
0 8
1 39
1 40
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 7
0 -1
1 8
0 -1
0 -1
0 -1
0 -1
0 -1
1 9
0 -1
1 9
1 9
1 9
0 -1
0 -1
0 -1
0 -1
0 -1
1 8
0 -1
0 -1
0 -1
0 -1
0 -1
1 8
0 -1
0 -1
0 -1
0 -1
0 -1
1 8
0 -1
1 8
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #158:

score: 18
Accepted
time: 18ms
memory: 8608kb

input:

3
50000
0 12
0 13
0 11
0 4
0 15
0 12
0 14
0 9
1 4
1 5
1 7
0 10
0 13
1 8
0 11
0 13
1 11
1 12
1 9
1 1
0 6
0 12
0 14
0 11
1 16
0 13
1 14
0 14
0 14
0 7
0 15
1 19
0 13
1 18
0 13
0 8
0 11
1 23
1 24
1 20
1 15
1 13
1 22
0 8
0 14
1 27
0 12
0 13
0 8
1 28
0 14
1 30
0 11
0 10
1 33
1 26
1 29
1 32
0 10
1 34
1 31
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 12
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #159:

score: 18
Accepted
time: 18ms
memory: 8604kb

input:

3
50000
0 14
0 12
0 13
1 3
0 7
0 5
1 2
0 7
0 15
1 7
0 15
1 5
1 1
0 15
1 9
0 15
1 4
1 6
0 4
1 11
0 15
0 14
0 15
0 5
0 14
1 13
0 8
0 15
1 16
1 17
1 15
0 13
0 10
0 12
0 15
0 13
0 11
0 11
0 14
1 19
1 25
0 10
1 27
0 10
1 28
1 20
1 22
0 9
1 29
1 26
0 12
0 13
0 15
1 31
0 14
1 30
1 32
0 14
1 34
0 12
0 15
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 14
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 7
0 -1
1 7
0 -1
1 15
1 15
1 15
1 15
1 15
1 15
1 15
1 15
1 15
1 15
1 15
1 15
1 15
1 15
1 15
1 15
1 15
1 15
1 15
1 15
1 15
0 -1
0 -1
0 -1
1 15
0 -1
1 15
0 -1
1 15
1 15
1 1...

result:

ok both questions correct

Test #160:

score: 18
Accepted
time: 18ms
memory: 8564kb

input:

3
50000
0 23
0 25
0 29
0 11
0 22
1 5
0 24
1 1
0 23
1 7
0 26
1 4
0 23
1 2
0 14
1 3
1 6
0 9
1 11
0 24
0 30
1 13
0 30
1 12
0 24
0 29
0 23
0 18
0 21
1 19
0 21
1 20
1 17
0 28
0 25
1 21
0 29
0 28
0 25
1 25
1 16
0 21
0 27
1 26
1 27
1 15
0 13
1 14
1 18
1 22
0 19
1 29
1 23
1 9
0 14
1 30
1 24
1 8
0 26
0 15
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 23
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #161:

score: 18
Accepted
time: 13ms
memory: 8548kb

input:

3
50000
0 30
0 30
0 25
1 3
0 23
0 5
1 2
1 1
0 30
0 26
0 21
1 7
1 8
0 29
0 16
0 11
0 21
1 11
0 27
0 28
0 17
0 29
0 25
1 16
0 17
0 18
0 20
1 17
0 29
0 26
0 29
1 14
0 30
0 30
1 13
0 20
0 27
1 26
1 27
1 25
0 18
0 23
0 25
0 15
1 28
1 31
0 12
1 32
0 21
0 27
1 30
1 12
0 25
0 17
1 36
0 26
0 26
0 28
0 30
1 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 30
1 30
1 30
1 30
1 30
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #162:

score: 18
Accepted
time: 14ms
memory: 8548kb

input:

3
50000
0 41
0 40
0 33
0 40
0 30
1 3
0 39
0 42
1 5
1 4
0 39
0 44
1 9
1 2
1 8
0 38
1 6
1 1
0 46
0 39
0 22
1 13
1 11
1 12
0 33
1 14
0 37
1 15
0 27
1 16
0 21
0 47
1 17
0 27
1 19
0 28
1 20
1 18
0 49
1 21
0 50
1 22
0 20
0 46
1 23
0 20
0 47
1 25
0 44
1 27
0 46
1 28
1 26
1 24
0 42
0 41
0 40
0 44
1 32
0 48
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 41
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #163:

score: 18
Accepted
time: 10ms
memory: 8580kb

input:

3
50000
0 44
0 47
0 49
1 3
0 41
0 15
1 4
0 38
1 5
1 1
0 29
0 32
1 6
0 41
1 7
1 2
0 43
0 48
0 45
1 10
1 12
0 47
1 11
1 13
0 44
0 32
0 27
0 35
1 14
1 16
1 15
0 30
0 45
0 37
1 18
1 17
1 19
1 20
0 50
0 50
0 43
0 47
0 47
1 23
0 43
0 33
1 27
0 37
1 28
0 36
0 32
0 49
0 27
0 41
1 33
0 50
0 48
1 34
1 30
0 36...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 44
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #164:

score: 18
Accepted
time: 18ms
memory: 8608kb

input:

3
50000
0 8
0 6
0 10
1 3
0 10
1 1
0 9
0 7
0 5
0 10
1 8
0 10
1 9
0 9
0 9
0 5
1 12
1 5
0 10
1 13
1 6
1 11
1 7
1 10
0 7
0 10
1 15
0 9
0 9
1 17
1 14
0 10
1 18
0 10
0 8
1 20
1 19
0 9
1 21
0 6
1 22
1 16
0 9
1 23
0 9
1 24
0 7
0 10
1 25
0 7
1 27
1 26
0 9
0 8
0 8
1 28
1 29
1 30
0 10
1 31
0 10
0 9
1 32
0 10
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 8
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #165:

score: 18
Accepted
time: 19ms
memory: 8500kb

input:

3
50000
0 3
0 4
0 1
0 3
1 4
0 3
1 1
1 2
0 4
1 6
0 2
0 4
0 4
0 1
1 8
1 7
1 5
0 4
0 3
1 12
1 3
0 1
0 4
1 13
1 14
1 10
0 2
0 4
0 1
0 2
0 2
1 17
1 15
1 19
1 16
0 2
0 2
1 20
1 21
1 18
0 1
0 4
0 3
1 22
1 24
0 1
1 25
1 11
0 1
1 26
0 1
0 1
1 27
0 1
0 1
0 3
0 1
1 31
1 29
0 2
0 1
1 33
1 30
0 4
0 3
1 36
1 35
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
1 4
0 -1
1 4
1 4
1 4
1 4
1 4
1 4
1 4
0 -1
0 -1
0 -1
1 4
1 4
1 4
0 -1
1 2
0 -1
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
0 -...

result:

ok both questions correct

Test #166:

score: 18
Accepted
time: 18ms
memory: 8492kb

input:

3
50000
0 16
0 16
0 18
1 3
0 18
0 16
0 14
0 17
1 2
0 17
1 1
0 17
1 4
1 5
1 7
0 17
0 14
0 17
1 11
0 15
0 16
1 10
0 15
1 15
1 12
0 13
0 18
1 16
1 17
1 6
0 13
0 17
0 12
1 19
1 20
0 15
0 16
0 16
1 22
0 17
1 24
0 18
0 9
1 23
0 12
1 25
1 26
1 21
1 27
0 18
0 18
0 14
0 16
1 28
1 30
0 15
0 17
0 12
1 32
0 17
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 16
1 16
1 16
1 16
1 16
1 16
1 16
0 -1
0 -1
0 -1
0 -1
0 -1
1 17
1 17
1 17
1 17
1 17
1 17
1 17
1 17
1 17
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #167:

score: 18
Accepted
time: 15ms
memory: 8552kb

input:

3
50000
0 36
0 40
0 35
1 1
0 40
1 3
0 40
1 5
0 31
0 35
0 40
1 6
1 7
1 8
0 39
1 9
0 40
0 37
0 38
0 40
0 40
1 11
1 14
0 40
1 12
0 39
1 13
1 10
0 39
0 40
0 39
0 40
0 39
0 38
0 40
0 40
0 39
0 39
1 25
0 38
0 39
1 24
0 39
1 29
1 17
1 27
1 26
1 28
0 37
0 36
1 30
1 31
1 23
0 39
1 32
1 18
0 36
0 36
1 34
1 22...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 36
0 -1
0 -1
0 -1
1 40
1 40
1 40
1 40
1 40
0 -1
1 40
1 40
1 40
1 40
1 40
1 40
1 40
1 40
1 40
1 40
1 40
1 40
1 40
1 40
1 40
1 40
1 40
1 40
1 40
1 40
1 40
1 40
1 40
0 -1
1 40
1 40
1 40
0 -1
1 40
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1...

result:

ok both questions correct

Test #168:

score: 18
Accepted
time: 18ms
memory: 8608kb

input:

3
50000
0 110
0 94
0 103
1 3
0 107
0 102
1 2
1 1
0 96
0 110
1 7
1 5
0 105
1 8
0 109
1 9
0 110
0 106
0 106
1 11
1 12
0 109
0 108
1 4
0 110
1 6
1 10
0 109
1 15
1 16
0 109
1 17
0 103
0 106
0 106
1 19
0 101
0 109
0 107
1 22
0 106
0 107
1 23
0 107
1 26
1 18
0 103
1 21
0 105
0 107
0 106
1 29
0 109
1 28
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 110
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 109
0 -1
1 109
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

ok both questions correct

Test #169:

score: 18
Accepted
time: 20ms
memory: 8576kb

input:

3
50000
0 26
0 30
0 26
0 29
1 4
0 28
0 28
0 29
0 27
1 5
0 29
0 29
1 1
1 7
0 30
1 11
0 29
1 2
1 6
1 9
1 3
1 12
0 30
0 30
0 28
1 15
1 13
0 30
1 14
1 10
0 29
1 17
0 28
0 30
0 27
0 30
1 19
1 20
0 30
0 30
0 29
0 30
0 30
1 23
0 30
1 27
0 30
1 22
1 18
0 28
1 29
1 28
0 30
1 30
1 26
1 24
0 28
0 25
0 30
1 31
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 26
0 -1
1 26
0 -1
1 26
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 29
0 -1
1 29
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1...

result:

ok both questions correct

Test #170:

score: 18
Accepted
time: 17ms
memory: 8604kb

input:

3
50000
0 2
0 6
0 1
0 5
1 4
1 3
0 1
0 1
1 6
1 5
0 11
0 1
0 4
0 17
1 8
1 10
1 9
0 12
0 11
1 11
1 12
0 6
0 2
0 3
0 4
0 3
1 17
0 1
0 4
0 1
0 2
0 4
1 22
1 20
0 1
0 8
1 21
1 16
0 8
1 13
0 4
0 2
0 3
0 3
0 1
0 8
0 2
1 32
0 3
1 30
1 33
0 2
1 14
0 7
1 34
0 13
0 4
1 36
0 2
1 38
1 27
1 31
1 23
1 15
1 35
1 26
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #171:

score: 18
Accepted
time: 15ms
memory: 8804kb

input:

3
50000
0 2
0 12
0 6
0 1
1 4
0 1
1 1
1 2
0 5
0 1
1 7
1 6
0 2
0 3
1 5
0 1
0 2
0 5
1 11
1 12
0 2
1 13
0 1
0 7
1 15
0 3
1 3
0 1
0 10
0 3
0 5
1 17
0 1
0 2
0 1
1 21
0 1
1 18
0 4
0 5
1 24
0 1
1 20
0 2
0 3
1 29
1 22
0 4
0 12
1 30
1 25
0 6
1 32
0 3
0 2
1 33
0 3
0 6
0 6
0 3
0 2
1 36
0 1
0 4
0 1
1 41
0 2
0 3
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #172:

score: 18
Accepted
time: 14ms
memory: 8536kb

input:

3
50000
0 6
0 3
0 7
1 2
0 1
1 4
0 1
1 5
0 3
0 1
0 3
0 3
1 7
1 6
1 9
0 2
1 10
1 8
0 3
0 4
1 12
1 11
0 4
0 4
1 14
0 3
0 3
0 4
0 3
1 17
0 1
0 3
1 20
0 2
1 18
1 16
0 4
1 22
0 6
0 1
0 1
1 24
1 15
0 3
0 4
0 3
0 2
1 26
0 2
1 19
0 8
1 27
1 23
0 1
0 4
0 2
1 32
1 33
1 34
1 25
0 10
1 35
0 5
0 1
0 2
1 38
1 36
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 6
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

ok both questions correct

Test #173:

score: 18
Accepted
time: 17ms
memory: 8556kb

input:

3
50000
0 10
0 19
0 6
0 13
1 4
1 2
0 34
1 1
0 21
1 3
0 3
1 7
0 3
1 8
0 13
0 22
1 10
0 1
0 13
0 52
1 13
1 12
1 11
1 9
0 23
0 19
0 18
0 4
0 1
1 17
1 15
1 14
1 18
1 16
0 33
0 25
0 11
1 20
0 4
1 21
1 22
0 47
1 23
0 5
0 8
1 24
0 21
0 25
1 27
1 26
0 2
0 32
0 10
1 30
1 28
0 45
0 13
0 11
0 15
1 32
1 33
0 3
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 10
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #174:

score: 18
Accepted
time: 13ms
memory: 8568kb

input:

3
50000
0 7
0 6
0 10
1 3
0 1
0 15
0 32
0 2
0 65
0 73
0 20
0 3
0 19
1 6
1 11
0 18
1 4
0 1
0 13
1 15
0 6
1 16
0 12
1 1
0 3
1 14
0 5
0 28
0 23
0 1
0 17
0 14
1 22
0 23
0 27
1 24
1 8
1 17
0 15
0 89
1 27
1 28
1 19
0 6
1 10
1 13
0 26
1 30
0 1
1 26
1 18
1 7
0 38
0 2
0 11
0 29
1 34
1 35
1 32
1 21
0 18
1 36
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 7
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #175:

score: 18
Accepted
time: 14ms
memory: 8840kb

input:

3
50000
0 1
0 14
0 1
0 8
0 4
0 5
1 3
0 15
0 17
0 16
1 7
1 5
1 6
0 23
0 3
1 10
1 11
0 6
1 4
0 19
0 27
1 13
1 9
1 12
1 14
0 5
0 25
0 11
0 17
1 16
0 4
0 11
1 18
0 20
1 19
1 21
1 15
0 13
0 18
0 7
0 33
0 45
1 25
1 23
0 1
1 27
0 5
0 2
0 18
0 5
1 28
1 22
0 14
0 1
1 32
1 20
1 17
1 26
0 6
1 34
1 31
1 33
0 41...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

ok both questions correct

Test #176:

score: 18
Accepted
time: 17ms
memory: 8552kb

input:

3
50000
0 6
0 9
0 8
1 3
0 1
1 4
0 8
0 3
0 3
0 6
0 6
1 9
1 7
0 6
1 10
1 6
1 2
1 1
0 5
0 7
0 6
1 13
1 11
0 5
0 8
0 8
0 6
1 15
0 5
0 7
1 18
0 5
1 16
0 7
0 8
1 22
0 1
1 23
1 21
0 2
0 1
1 25
0 1
1 26
1 12
0 5
0 2
1 28
0 8
1 27
1 29
0 6
0 1
0 2
0 5
1 31
0 6
1 33
1 30
0 1
1 35
0 9
0 6
0 4
1 38
1 37
0 1
1 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 6
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 6
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

ok both questions correct

Test #177:

score: 18
Accepted
time: 14ms
memory: 8544kb

input:

3
50000
0 6
0 4
0 68
0 34
1 3
1 4
0 12
0 30
1 5
0 16
0 23
0 4
1 2
0 21
0 22
0 3
0 19
0 5
1 10
1 13
1 14
0 43
1 15
1 11
1 8
1 6
0 14
0 5
0 14
0 10
0 13
0 43
1 16
1 17
0 6
0 4
1 21
1 23
0 5
1 24
1 20
0 34
1 25
1 22
0 1
0 12
0 25
0 13
1 29
1 26
1 18
0 19
1 30
0 20
1 31
0 1
1 32
1 19
1 12
1 1
0 18
0 8
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 6
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #178:

score: 18
Accepted
time: 17ms
memory: 8584kb

input:

3
50000
0 9
0 12
0 37
0 1
1 4
0 34
1 2
0 25
0 9
0 13
1 6
1 8
1 3
1 5
0 45
1 9
0 6
1 10
0 8
0 5
0 5
1 11
1 12
1 7
0 8
1 14
0 27
0 7
0 16
1 17
0 4
1 15
1 16
0 19
0 19
0 3
0 8
1 19
1 22
1 20
1 1
0 5
1 23
1 18
0 2
0 13
1 25
1 24
0 15
1 26
0 15
0 2
1 27
1 28
0 27
1 29
0 8
1 30
0 6
1 31
0 53
1 32
0 5
0 33...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 9
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 9
1 9
1 9
1 9
1 9
1 9
1 9
0 -1
0 -1
0 -1
1 9
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #179:

score: 18
Accepted
time: 17ms
memory: 8552kb

input:

3
50000
0 14
0 48
0 30
0 3
0 16
1 5
1 3
0 22
0 21
1 7
0 7
1 8
1 4
0 2
1 9
1 1
0 26
0 5
1 11
1 2
0 2
1 6
0 9
1 13
0 2
0 1
0 8
0 4
1 16
1 15
0 35
1 18
0 4
1 19
1 17
1 14
0 1
1 20
0 23
1 21
0 18
0 45
1 22
1 23
0 33
1 24
0 3
1 25
0 4
1 26
0 4
0 14
0 18
0 5
1 28
0 5
0 18
0 19
0 8
1 31
0 17
0 12
0 7
1 35
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 14
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

ok both questions correct

Test #180:

score: 18
Accepted
time: 10ms
memory: 8580kb

input:

3
50000
0 1
0 6
0 3
0 2
1 1
1 2
0 2
1 3
0 1
1 6
0 2
1 7
0 9
0 3
0 4
1 9
1 8
0 7
0 6
0 3
0 5
1 13
1 14
1 11
0 10
1 15
1 10
0 2
0 6
1 17
0 9
0 1
1 18
0 9
0 1
0 22
1 20
0 5
0 14
1 21
1 23
0 11
0 2
1 22
0 2
0 7
0 1
1 28
0 14
1 27
1 24
0 2
0 6
0 4
0 29
1 33
1 31
1 32
0 32
1 35
0 4
1 36
0 10
1 37
1 26
1 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
1 2
1 2
1 2
1 2
1 2
1 2
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
1 2
1 2
1 2
1 2
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #181:

score: 18
Accepted
time: 17ms
memory: 8500kb

input:

3
50000
0 2
0 18
0 2
1 1
0 6
1 2
0 33
0 1
0 8
1 7
1 3
0 5
0 10
0 1
1 9
0 7
1 11
0 4
0 2
0 8
1 12
0 5
1 14
1 13
1 15
1 8
1 4
1 10
0 2
0 11
1 17
0 3
1 18
1 16
0 4
1 19
0 1
1 20
0 4
0 7
1 21
0 15
1 23
0 8
1 22
1 5
0 2
0 20
1 26
1 25
0 6
1 27
0 2
1 28
0 20
1 29
0 9
0 1
0 2
1 30
1 31
1 32
0 3
1 33
0 4
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 2
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #182:

score: 18
Accepted
time: 14ms
memory: 8808kb

input:

3
50000
0 1
0 48
0 11
0 1
1 4
1 3
0 10
1 2
0 3
0 5
1 6
1 1
0 1
1 8
0 5
0 39
1 9
1 10
0 24
1 11
0 1
1 12
0 24
1 5
0 19
1 14
0 8
0 2
1 16
1 15
0 23
0 50
0 18
0 5
0 1
1 21
1 18
0 16
0 19
1 19
0 22
0 6
0 27
1 26
0 22
1 25
1 17
0 5
0 7
1 24
1 22
0 18
0 9
1 30
1 31
0 2
1 32
1 23
1 27
0 31
1 33
1 28
0 5
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 5
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

ok both questions correct

Test #183:

score: 18
Accepted
time: 18ms
memory: 8916kb

input:

3
50000
0 4
0 6
0 10
0 3
1 1
0 7
0 4
1 3
0 35
1 7
0 17
1 8
1 2
0 28
1 6
0 15
1 10
0 25
0 2
1 11
1 9
0 27
0 31
1 14
0 3
0 5
1 15
1 16
1 13
1 4
0 56
1 17
0 2
0 3
0 28
0 3
0 9
0 13
0 17
1 18
0 18
0 14
1 26
1 22
0 30
1 25
0 2
0 13
0 11
1 29
0 10
1 31
1 30
1 24
1 28
1 19
0 37
1 32
1 20
0 44
1 33
1 23
0 4...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

ok both questions correct

Test #184:

score: 18
Accepted
time: 14ms
memory: 8552kb

input:

3
50000
0 496
0 488
0 494
1 1
0 497
1 2
0 499
1 5
0 481
0 484
1 6
0 453
0 494
1 8
0 490
0 470
1 10
1 11
0 495
0 478
0 487
0 490
1 15
0 495
1 16
0 496
0 496
0 489
0 499
0 493
1 19
0 486
0 495
0 499
0 494
0 494
1 25
1 23
0 486
0 493
0 442
1 29
1 17
0 500
1 21
0 500
0 489
0 481
1 28
0 489
1 26
0 497
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 496
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #185:

score: 18
Accepted
time: 18ms
memory: 8568kb

input:

3
50000
0 493
0 500
0 495
1 2
0 494
0 493
1 5
0 494
1 6
1 1
0 500
0 473
0 491
0 492
1 8
0 482
1 9
0 453
0 491
0 500
0 479
0 499
1 14
1 15
0 492
1 17
1 12
1 7
1 16
0 494
1 18
1 10
1 3
0 481
0 496
0 484
0 498
0 475
0 450
0 485
0 491
1 22
0 489
0 500
0 488
0 497
0 500
1 29
0 488
0 483
0 490
0 500
0 488...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 493
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #186:

score: 18
Accepted
time: 18ms
memory: 8540kb

input:

3
50000
0 497
0 499
0 499
1 3
0 497
0 500
0 496
0 500
1 4
1 1
1 2
0 494
0 497
0 495
0 500
1 9
1 11
1 10
0 500
1 12
1 8
1 7
0 497
0 500
0 499
0 496
0 495
0 500
1 18
1 14
0 500
0 500
1 20
1 16
1 15
1 5
0 498
1 21
0 500
1 22
1 19
0 496
1 23
0 489
1 24
0 493
1 25
1 6
0 500
0 494
0 489
1 27
1 26
1 28
0 4...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 497
0 -1
1 499
0 -1
1 497
0 -1
0 -1
0 -1
0 -1
0 -1
1 500
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 500
0 -1
1 500
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #187:

score: 18
Accepted
time: 8ms
memory: 8908kb

input:

3
50000
0 3
0 2
0 9
1 1
0 8
1 2
0 1
0 5
0 4
0 2
1 6
0 1
1 7
1 9
1 5
1 8
0 8
0 9
0 8
1 11
1 10
0 5
1 13
1 12
0 7
0 4
1 15
0 9
0 6
0 2
1 16
1 18
0 4
0 6
0 8
0 4
1 19
0 1
0 4
1 23
0 2
1 24
1 21
0 2
1 26
1 20
1 17
1 22
1 25
0 2
1 27
1 4
0 5
1 28
0 6
1 29
0 9
1 30
0 9
0 1
0 7
0 8
1 32
0 3
0 3
1 35
0 8
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 8
0 -1
1 8
1 8
1 8
0 -1
1 8
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #188:

score: 18
Accepted
time: 19ms
memory: 8496kb

input:

3
50000
0 500
0 500
0 499
1 2
0 498
0 499
0 499
1 6
0 500
0 496
0 499
0 494
1 10
1 3
0 497
0 497
0 495
1 12
1 5
0 496
1 9
1 13
1 1
1 4
0 500
0 498
0 493
0 495
1 18
0 496
1 16
1 19
1 14
1 8
0 499
1 20
1 7
0 492
0 497
1 22
0 499
1 21
1 23
0 500
0 500
0 500
1 24
0 496
0 498
0 499
0 500
0 486
0 499
0 49...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 500
1 500
1 500
0 -1
0 -1
0 -1
1 499
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 500
1...

result:

ok both questions correct

Test #189:

score: 18
Accepted
time: 20ms
memory: 8544kb

input:

3
50000
0 500
0 499
0 500
1 2
0 498
1 3
0 500
0 500
1 4
0 500
0 500
0 498
0 498
1 7
1 9
0 491
1 11
1 10
1 1
0 500
0 490
0 495
0 499
1 15
1 14
1 12
0 500
1 16
1 5
0 496
0 500
0 495
0 496
1 18
1 19
1 20
1 17
1 13
0 499
0 499
1 21
0 498
0 499
0 497
1 25
0 499
1 24
1 22
1 23
1 8
0 500
0 500
1 27
0 499
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 500
0 -1
1 500
1 500
1 500
0 -1
1 500
1 500
1 500
1 500
1 500
1 500
1 500
1 500
1 500
1 500
1 500
1 500
1 500
1 500
1 500
1 500
1 500
1 500
1 500
1 500
1 500
1 500
1 500
0 -1
1 500
0 -1
0 -1
0 -1
0 -1
0 -1
1 500
1 500
1 500
0 -1
...

result:

ok both questions correct

Test #190:

score: 18
Accepted
time: 15ms
memory: 8648kb

input:

3
50000
0 500
0 497
0 500
0 500
1 1
0 499
1 2
0 500
1 6
1 4
0 498
0 499
0 492
1 7
1 9
1 8
0 497
0 497
1 10
0 499
1 12
1 11
0 500
0 500
0 497
1 13
0 500
1 16
0 500
1 17
1 15
1 14
0 500
1 18
0 500
1 19
0 499
0 500
1 20
1 21
0 500
0 500
0 498
0 499
0 497
0 499
0 498
0 497
0 497
1 29
0 500
1 30
0 497
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 500
0 -1
1 500
1 500
1 500
0 -1
1 500
1 500
1 500
0 -1
0 -1
0 -1
0 -1
0 -1
1 499
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 500
1 500
1 500
0 -1
1 500
0 -1
1 500
0 -1
1 500
0 -1
1 500
0 -1
1 500
0 -1
1 499
0 -1
1 500
0 -1
1 500
1 500
1...

result:

ok both questions correct

Test #191:

score: 18
Accepted
time: 19ms
memory: 8644kb

input:

3
50000
0 2
0 1
0 1
0 1
1 3
1 1
0 4
0 1
0 1
1 5
0 2
1 2
1 7
1 4
0 2
0 2
1 9
1 10
0 2
1 11
0 1
1 12
0 1
1 13
0 4
0 2
1 14
1 8
0 4
0 6
1 16
0 4
1 17
1 18
0 1
1 19
0 1
1 20
0 1
1 21
0 1
0 1
1 23
1 22
0 1
0 2
0 4
1 24
1 25
1 26
0 1
0 1
0 1
1 29
0 1
0 4
0 3
1 31
1 32
1 28
0 1
0 2
1 33
0 1
0 2
1 36
0 1
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 2
0 -1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
0 -1
1 2
1 2
1 2
0 -1
1 2
0 -1
1 1
0 -1
1 1
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
1 1
0 -1
1 1
0 -1
1 1
1 1
1 1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
1 1...

result:

ok both questions correct

Test #192:

score: 18
Accepted
time: 19ms
memory: 8544kb

input:

3
50000
0 2
0 2
0 1
0 2
1 1
1 2
0 2
0 1
0 1
1 6
1 7
1 4
0 1
1 5
0 1
0 1
1 10
0 6
1 11
1 8
0 1
0 1
1 13
0 1
1 12
0 2
0 5
0 1
1 17
0 1
1 18
1 15
0 4
0 3
1 19
0 5
0 2
1 20
0 7
0 2
1 21
1 24
1 23
1 22
1 9
1 14
0 1
1 25
0 1
1 26
0 2
0 2
1 27
0 4
0 2
1 30
0 1
1 31
0 1
1 29
0 2
0 1
1 33
0 2
1 35
0 1
1 36
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 2
1 2
1 2
1 2
1 2
0 -1
1 2
0 -1
1 1
0 -1
1 2
0 -1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
1 1
1 1
0 -1
1 1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #193:

score: 18
Accepted
time: 19ms
memory: 8860kb

input:

3
50000
0 49999
0 49999
0 799
0 2127
0 14760
0 6976
0 17347
0 6179
0 1624
0 49999
0 3073
0 49999
0 19709
0 576
0 49999
0 15593
0 21710
0 14767
0 23349
0 9833
0 1984
0 49999
0 8258
0 6246
0 49999
0 49999
0 18681
0 49999
0 9742
0 49999
0 49999
0 12955
0 49999
0 6443
0 49999
0 49999
0 5410
0 21429
0 49...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 49999
1 49999
1 49999
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #194:

score: 18
Accepted
time: 18ms
memory: 8556kb

input:

3
50000
0 23879
1 1
0 15105
1 2
0 35221
1 3
0 48114
1 4
0 26978
1 5
0 48216
1 6
0 22637
1 7
0 19339
1 8
0 36016
1 9
0 43771
1 10
0 3568
1 11
0 42361
1 12
0 16390
1 13
0 45304
1 14
0 33407
1 15
0 40884
1 16
0 34015
1 17
0 40625
1 18
0 6827
1 19
0 36151
1 20
0 38231
1 21
0 48190
1 22
0 1854
1 23
0 329...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 0
1 23879
0 -1
1 15105
0 -1
1 35221
0 -1
1 48114
0 -1
1 26978
0 -1
1 48216
0 -1
1 22637
0 -1
1 19339
0 -1
1 36016
0 -1
1 43771
0 -1
1 3568
0 -1
1 42361
0 -1
1 16390
0 -1
1 45304
0 -1
1 33407
0 -1
1 40884
0 -1
1 34015
0 -1
1 40625
0 -...

result:

ok both questions correct

Test #195:

score: 18
Accepted
time: 16ms
memory: 8540kb

input:

3
50000
0 49999
0 49999
0 17184
0 2975
0 49999
0 3851
0 49999
0 49999
0 18774
0 21659
0 23661
0 8205
1 1
0 16557
1 12
0 9314
0 1337
0 49999
0 6457
0 49999
0 49999
0 49999
0 49999
0 8690
0 49999
1 16
0 6169
0 49999
1 21
1 23
0 49999
0 49999
0 49999
0 49999
0 5637
1 28
0 2085
0 49999
1 22
0 49999
0 75...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 49999
1 49999
1 49999
0 -1
1 49999
0 -1
1 49999
1 49999
1 49999
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #196:

score: 18
Accepted
time: 20ms
memory: 8808kb

input:

3
50000
0 3
0 4
0 4
1 3
0 1
1 4
0 4
0 4
1 5
1 6
0 3
0 4
0 3
0 4
1 8
1 7
0 4
0 2
1 11
1 10
1 12
0 1
1 13
1 2
0 4
1 14
0 1
0 1
0 1
1 17
0 4
1 18
1 1
1 9
0 4
1 19
0 4
1 20
0 4
1 21
0 4
0 4
0 4
0 2
0 1
0 1
1 22
0 4
1 28
1 27
0 3
1 29
0 4
0 4
0 2
0 4
0 3
1 32
0 2
1 30
1 34
0 1
1 35
1 36
1 31
0 4
0 1
0 1
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 3
0 -1
1 4
0 -1
0 -1
0 -1
1 4
1 4
1 4
0 -1
1 3
0 -1
1 3
0 -1
1 3
0 -1
1 4
0 -1
0 -1
0 -1
1 3
0 -1
1 3
1 3
1 3
1 3
1 3
0 -1
1 1
0 -1
0 -1
0 -1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
0 -1
1 4
0 -1
0 -1
0 -1
1 1
0 -1
1 1
0 -1
0 -1
0 -1...

result:

ok both questions correct

Test #197:

score: 18
Accepted
time: 18ms
memory: 8808kb

input:

3
50000
0 3
0 2
0 4
1 2
0 4
0 4
1 4
0 2
0 3
0 2
0 4
0 1
1 7
0 4
0 3
1 11
0 4
1 13
1 12
0 1
1 8
1 14
0 4
0 1
0 4
0 4
0 3
1 19
0 4
1 16
1 18
1 17
0 4
1 21
0 3
1 22
0 4
1 23
1 1
0 4
0 3
1 24
0 1
0 1
0 1
1 27
0 2
1 29
1 25
1 15
1 28
0 2
1 30
1 26
1 20
0 4
0 4
1 32
0 1
0 3
1 31
0 2
0 4
0 1
1 36
1 37
0 2
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 3
0 -1
0 -1
0 -1
1 4
1 4
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
0 -1
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
0 -1
1 4
0 ...

result:

ok both questions correct

Test #198:

score: 18
Accepted
time: 17ms
memory: 8544kb

input:

3
50000
0 7
0 6
0 1
0 8
1 1
0 9
0 7
0 9
0 6
0 7
0 3
1 5
0 8
1 2
0 2
0 6
1 13
0 1
0 9
1 10
1 12
1 15
1 9
0 9
1 16
1 4
0 2
1 17
0 5
1 6
0 2
0 1
0 4
0 3
1 20
0 9
0 7
0 4
0 7
0 7
0 7
0 3
0 9
1 24
1 19
1 23
0 4
1 28
0 7
0 1
1 29
0 5
0 4
0 3
0 2
0 8
1 37
0 1
1 35
1 39
0 3
1 40
0 2
0 8
1 25
0 6
1 42
1 36
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 7
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #199:

score: 18
Accepted
time: 17ms
memory: 8808kb

input:

3
50000
0 7
0 8
0 8
0 6
0 3
1 1
1 3
1 2
0 4
1 6
0 7
0 7
1 8
1 7
0 3
1 9
0 8
1 10
0 3
0 8
1 11
0 3
1 5
1 13
0 7
0 3
0 3
0 5
1 16
1 15
1 17
0 2
1 18
1 14
0 1
1 19
0 5
0 6
1 21
1 20
0 4
0 1
1 22
0 3
1 24
1 23
0 4
0 6
0 3
0 3
1 25
1 28
1 27
0 1
1 29
0 6
1 30
0 8
1 31
0 5
1 32
1 26
0 3
0 2
0 7
0 7
0 5
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 7
0 -1
1 8
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
0 -1
0 -1
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #200:

score: 18
Accepted
time: 14ms
memory: 8544kb

input:

3
50000
0 3
0 6
0 4
0 6
0 4
0 8
1 4
0 2
1 2
1 7
0 5
0 4
0 1
1 8
0 8
0 2
1 5
1 12
0 7
1 13
0 4
0 8
0 2
1 14
1 16
1 9
1 11
1 10
1 3
1 15
0 4
0 3
0 5
0 3
0 3
1 21
0 8
0 4
0 3
0 6
0 2
1 26
0 2
1 27
1 24
1 23
1 25
1 22
0 8
0 7
0 3
1 28
1 30
1 29
1 19
1 20
1 18
1 17
0 7
0 3
1 31
1 32
0 3
0 7
0 6
1 35
1 34...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 8
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1...

result:

ok both questions correct

Test #201:

score: 18
Accepted
time: 17ms
memory: 8580kb

input:

3
50000
0 15
0 32
0 13
1 1
0 13
1 4
0 11
1 2
0 10
1 6
0 20
0 3
0 5
0 1
0 11
1 10
0 12
0 23
1 12
1 9
0 13
0 31
0 18
0 20
1 16
1 14
0 3
1 3
0 8
1 18
1 7
0 1
1 20
1 5
0 2
1 21
0 3
1 15
0 25
0 26
0 23
0 28
1 24
1 22
0 9
1 27
0 5
0 24
0 15
1 11
1 23
1 17
1 30
0 9
1 31
0 7
1 32
1 19
0 2
1 33
1 25
0 30
0 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 15
0 -1
0 -1
0 -1
1 13
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #202:

score: 18
Accepted
time: 17ms
memory: 8836kb

input:

3
50000
0 27
0 5
0 1
1 2
0 13
0 10
0 22
1 4
1 3
1 5
0 3
1 7
0 19
0 18
1 8
1 9
0 19
0 9
0 25
1 12
0 9
0 8
1 14
0 2
0 31
0 11
0 28
0 6
0 6
1 19
1 15
1 11
0 31
1 18
1 16
0 6
1 17
1 21
0 16
0 14
0 18
0 28
0 12
1 25
1 27
1 23
1 24
0 6
1 28
0 7
0 14
0 11
0 15
1 30
1 31
1 1
0 30
1 33
1 10
1 13
1 6
0 32
1 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 27
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #203:

score: 18
Accepted
time: 14ms
memory: 8552kb

input:

3
50000
0 4
0 3
0 1
0 2
0 1
1 1
1 2
0 3
1 6
1 5
0 1
1 7
0 2
1 3
0 3
1 4
0 1
0 2
0 3
0 1
0 2
1 11
1 14
1 12
1 13
0 2
1 15
1 10
0 3
0 3
0 1
1 18
0 1
1 16
0 2
1 20
0 3
0 3
0 1
0 4
0 2
1 23
1 25
1 21
1 24
1 22
0 2
0 3
0 3
1 26
1 28
1 27
0 4
1 19
1 9
1 29
0 3
0 4
1 31
1 30
0 1
0 4
0 3
0 1
1 32
1 34
1 33
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
1 1
0 -1
1 1
0 -1
1 2
1 2
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
1 3
1 3
1 3
1 3
0 -1
0 -1
0 -1
1 3
1 3
1 3
0 -1
0 -1
0 -1
1 3
0 -1
1 3
0 -1
0 -1
0 -1
1 3
1 3
...

result:

ok both questions correct

Test #204:

score: 18
Accepted
time: 14ms
memory: 8600kb

input:

3
50000
0 4
0 4
0 1
1 2
0 4
0 4
1 1
0 1
1 6
1 4
0 1
0 3
1 8
1 7
0 1
1 3
0 1
1 10
0 4
0 3
1 11
0 4
1 5
1 13
0 4
1 14
0 4
0 4
1 15
1 16
0 3
1 17
0 1
0 1
1 18
1 19
0 4
1 20
0 1
0 2
1 21
0 4
0 1
1 23
0 1
0 1
0 3
0 2
1 27
1 26
0 3
0 3
1 28
1 25
0 4
1 31
1 22
0 2
0 3
0 4
0 1
1 35
0 4
0 3
0 2
1 36
0 2
0 4
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 4
1 4
1 4
0 -1
1 4
1 4
1 4
0 -1
1 4
0 -1
1 1
0 -1
1 1
0 -1
1 1
0 -1
1 1
0 -1
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
0 -1
1 1
1 1
1 1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
1 1
1 1
0 -1
1 1
0 -1
0 ...

result:

ok both questions correct

Test #205:

score: 18
Accepted
time: 13ms
memory: 8608kb

input:

3
50000
0 6
0 6
0 2
1 3
0 6
1 1
0 3
0 1
0 5
1 4
0 5
0 8
0 1
1 10
0 7
1 8
0 7
0 8
0 8
1 13
1 14
1 9
0 2
1 11
1 12
1 15
0 7
1 16
0 7
0 6
0 8
0 3
0 2
0 6
1 18
0 5
1 21
1 20
0 6
0 2
1 17
1 19
1 24
0 4
1 26
0 8
0 5
1 28
1 27
0 7
0 8
0 8
0 1
0 6
1 30
1 32
1 31
1 33
0 1
1 34
0 4
1 35
1 7
1 29
0 4
0 1
0 3
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 6
1 6
1 6
1 6
1 6
1 6
1 6
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

ok both questions correct

Test #206:

score: 18
Accepted
time: 17ms
memory: 8668kb

input:

3
50000
0 2
0 3
0 6
0 2
0 5
0 3
0 1
0 4
1 6
1 2
1 7
1 5
1 8
1 1
0 8
1 9
0 7
0 7
1 10
1 4
0 5
1 12
0 4
0 3
0 1
1 14
1 13
1 11
0 6
1 15
0 7
1 17
0 4
0 8
1 18
1 19
0 4
1 20
0 7
1 21
0 2
0 6
0 6
0 1
0 5
1 25
1 24
1 23
1 26
0 6
1 27
0 2
1 28
0 1
1 29
1 22
0 6
1 30
0 5
0 6
0 3
0 5
0 3
0 1
1 36
1 33
0 7
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 6
1 6
1 6
1 6
1 6
0 -1
1 6
1 6
1 6
1 6
1 6
1 6
1 6
1 6
1 6
1 6
1 6
1 6
1 6
0 -1
1 6
1 6
1 6...

result:

ok both questions correct

Test #207:

score: 18
Accepted
time: 17ms
memory: 8552kb

input:

3
50000
0 14
0 13
0 7
1 2
0 5
0 23
0 27
1 1
0 5
1 7
1 4
1 5
0 4
1 8
0 7
0 20
1 10
0 24
1 3
1 9
0 32
0 23
0 2
1 12
0 25
0 14
0 31
0 8
1 16
0 22
0 21
0 11
1 21
1 13
0 14
1 22
1 17
1 18
0 7
0 3
1 23
0 27
1 15
1 19
1 20
1 14
0 23
1 24
0 23
0 22
1 28
1 27
0 11
1 29
1 25
0 2
1 30
0 29
0 29
0 13
1 31
1 32
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 14
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 7
0 -1
1 7
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

ok both questions correct

Test #208:

score: 18
Accepted
time: 17ms
memory: 8836kb

input:

3
50000
0 26
0 19
0 27
1 2
0 5
1 4
0 21
0 6
1 3
0 30
0 14
0 17
0 6
0 17
1 9
1 8
1 11
1 10
0 11
1 12
1 5
0 18
0 21
1 13
0 29
1 15
0 3
0 28
1 16
1 14
0 18
1 18
1 6
0 2
1 19
0 28
0 5
1 20
0 7
0 15
0 3
1 22
0 22
0 19
0 26
1 27
1 24
0 13
0 32
0 4
1 30
0 24
1 26
0 10
1 32
1 21
1 23
1 28
1 7
0 29
1 33
0 12...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 26
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #209:

score: 18
Accepted
time: 17ms
memory: 8548kb

input:

3
50000
0 4
0 14
0 9
0 11
0 14
1 4
1 1
0 14
1 2
1 5
0 10
1 7
0 4
0 1
0 4
1 9
0 4
1 8
1 11
0 4
0 10
1 13
1 12
1 10
0 3
0 10
0 6
1 15
1 14
1 16
0 6
1 17
0 14
0 7
0 11
1 19
0 15
0 11
0 8
1 23
1 20
1 22
1 21
0 5
1 24
1 6
0 10
1 25
0 2
1 26
0 5
1 27
0 6
1 28
0 6
0 15
0 10
1 29
0 11
1 32
0 14
0 14
1 33
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
1 14
1 14
1 14
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 14
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 14
0 -1
1 14
0 -1
0 -...

result:

ok both questions correct

Test #210:

score: 18
Accepted
time: 15ms
memory: 8492kb

input:

3
50000
0 2
0 3
0 4
0 4
1 3
0 4
0 1
0 1
1 7
1 5
0 2
1 6
0 4
1 8
0 3
0 3
0 2
1 12
1 11
0 2
1 13
1 10
1 2
0 2
0 2
1 15
1 4
0 3
1 16
0 2
1 17
1 1
0 1
1 18
0 3
1 19
0 4
1 20
0 1
1 21
0 3
0 4
0 3
1 24
1 23
0 2
0 1
1 25
1 26
0 3
1 27
1 22
0 3
1 28
0 1
0 4
1 29
0 2
0 4
0 3
0 4
0 1
1 32
1 31
0 3
0 3
1 35
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
0 -1
1 2
0 -1
1 2
0 -1
1 2
1 2
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1...

result:

ok both questions correct

Test #211:

score: 18
Accepted
time: 14ms
memory: 8576kb

input:

3
50000
0 3
0 4
0 4
0 4
1 4
1 2
0 3
0 3
0 2
0 4
1 7
0 3
0 1
0 2
1 11
0 3
0 2
0 3
0 4
1 12
1 10
1 5
1 8
1 14
1 13
1 9
0 2
0 1
0 1
0 2
0 4
0 4
0 2
0 2
0 4
1 18
1 24
0 4
0 1
1 16
0 2
0 3
0 4
0 4
1 22
1 21
0 2
0 3
1 31
0 4
1 17
1 20
0 2
0 2
0 2
1 36
0 1
0 3
0 4
1 35
0 3
0 3
0 2
1 41
1 42
0 4
1 43
1 40
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 3
0 -1
1 4
1 4
1 4
0 -1
1 3
1 3
1 3
0 -1
1 3
1 3
1 3
0 -1
1 3
1 3
1 3
1 3
1 3
0 -1
1 3
0 -1
1 3
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1...

result:

ok both questions correct

Test #212:

score: 18
Accepted
time: 18ms
memory: 8564kb

input:

3
50000
0 15
0 13
0 7
0 1
1 2
1 1
0 11
0 6
0 2
1 7
0 3
0 12
1 8
1 5
1 6
0 15
0 10
1 10
0 3
1 12
0 8
1 13
1 11
0 14
1 14
0 6
1 15
1 3
0 3
0 9
1 16
0 11
1 18
0 7
1 19
0 9
0 7
0 8
0 3
1 22
1 23
0 7
0 4
0 1
0 13
0 13
1 26
0 12
1 29
0 14
1 24
1 21
0 13
0 6
0 13
1 32
1 30
1 20
0 8
1 34
0 3
0 12
0 6
0 3
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 15
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #213:

score: 18
Accepted
time: 17ms
memory: 8640kb

input:

3
50000
0 9
0 5
0 5
0 5
1 1
0 5
0 6
0 12
1 5
0 9
1 2
0 15
1 3
1 7
0 8
0 5
1 10
0 13
1 4
1 8
1 12
1 11
0 10
0 11
1 14
0 2
0 2
1 15
1 13
1 16
0 7
1 6
0 6
0 14
1 18
1 19
0 12
1 20
0 6
1 21
0 6
1 22
0 11
0 12
1 23
1 24
0 13
0 12
1 25
1 26
0 14
1 9
0 12
0 11
0 2
1 28
1 30
1 29
0 15
1 31
0 5
0 7
0 1
1 34
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 9
0 -1
1 5
1 5
1 5
1 5
1 5
1 5
1 5
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1...

result:

ok both questions correct

Subtask #4:

score: 74
Accepted

Test #214:

score: 74
Accepted
time: 35ms
memory: 9032kb

input:

4
100000
0 3
0 3
0 3
0 4
0 2
1 4
0 2
0 2
0 3
0 2
0 1
0 2
0 3
0 1
1 7
1 5
1 12
0 2
0 2
1 1
1 10
0 2
1 14
0 3
1 17
0 2
1 8
0 1
0 1
0 4
1 20
1 11
1 6
0 1
1 9
1 21
1 19
1 18
1 22
1 3
1 15
1 16
0 1
0 2
0 2
1 23
0 2
0 2
1 26
0 4
0 4
1 29
1 25
0 4
0 1
0 3
0 2
1 31
1 32
1 24
0 4
1 34
1 27
0 4
0 2
0 1
1 35
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 3
1 3
1 3
1 3
1 3
1 3
1 3
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
1 2
1 2
0 -1
1 2
1 2
1 2
1 2
1 2
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
1 2
1 2
1 2
0 -1
0 ...

result:

points 1.0 p = 1.00, C = 0, E = 2

Test #215:

score: 74
Accepted
time: 35ms
memory: 8948kb

input:

4
100000
0 1
0 1
0 2
1 1
0 1
0 2
1 4
1 3
0 1
1 6
0 1
0 2
0 2
0 2
0 1
0 1
0 1
0 2
1 10
0 1
0 1
0 2
1 15
0 2
0 2
1 18
0 2
1 12
1 16
1 7
0 1
0 1
1 13
1 19
1 21
0 1
1 23
1 9
1 2
1 11
1 8
0 1
0 1
1 24
1 25
1 5
0 1
0 1
0 1
0 2
1 29
0 2
0 2
1 28
0 1
1 31
1 30
1 26
1 32
1 27
1 20
1 22
0 2
0 1
1 34
0 1
0 1
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 1
1 1
1 1
0 -1
1 1
0 -1
1 2
0 -1
1 1
0 -1
1 1
0 -1
1 2
1 2
1 2
0 -1
1 1
0 -1
1 1
1 1
1 1
1 1
1 1
0 -1
1 2
0 -1
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
0 -1
1 1
0 -1
1 1
0 -1
1 2
1 2
1 2...

result:

points 1.0 p = 1.00, C = 0, E = 2

Test #216:

score: 74
Accepted
time: 37ms
memory: 8852kb

input:

4
100000
0 1
0 1
0 2
1 3
0 1
1 1
0 4
1 5
0 2
1 6
0 1
0 1
0 1
0 1
1 8
1 7
1 4
1 2
0 1
0 3
1 12
0 1
0 1
1 11
0 1
1 13
0 2
0 1
1 16
0 1
1 18
1 15
1 17
1 10
0 1
0 2
0 3
1 21
0 1
1 19
0 2
1 23
1 14
1 9
0 2
1 22
0 2
1 25
0 1
1 26
0 1
0 3
1 28
1 27
0 2
1 29
0 1
1 30
0 4
1 31
0 3
0 1
0 1
0 2
1 34
0 1
1 32
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
0 -1
1 2
1 2
1 2
1 2
1 2
1 2
1 2
0 -1
1 2
1 2
1 2
1 2
1 2
1...

result:

points 1.0 p = 1.00, C = 0, E = 2

Test #217:

score: 74
Accepted
time: 33ms
memory: 8936kb

input:

4
100000
0 2
0 3
0 2
1 2
0 4
1 1
0 1
1 4
0 2
1 6
0 1
0 1
0 2
0 4
0 1
0 2
0 1
0 3
0 2
1 8
1 12
1 11
1 15
0 3
1 16
1 7
1 9
0 1
0 2
1 18
0 2
1 10
0 2
0 1
0 2
1 22
1 20
0 1
1 23
0 1
1 24
0 1
1 25
0 1
0 4
1 26
1 21
1 27
1 13
0 1
0 2
0 1
1 28
0 2
0 3
1 31
0 3
1 29
1 32
0 2
1 34
0 1
0 1
0 1
0 2
1 14
0 3
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 2
0 -1
1 2
1 2
1 2
0 -1
0 -1
0 -1
1 2
0 -1
1 1
1 1
1 1
0 -1
1 1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

points 1.0 p = 1.00, C = 0, E = 2

Test #218:

score: 74
Accepted
time: 33ms
memory: 8948kb

input:

4
100000
0 6
0 4
0 1
0 7
0 7
1 1
1 4
1 2
0 4
0 7
1 7
0 3
0 4
1 8
0 2
1 9
0 2
1 11
0 1
0 5
1 6
0 3
0 4
1 15
0 1
0 4
0 5
0 5
1 17
0 3
0 5
1 21
1 16
0 3
1 22
1 19
1 13
0 3
0 4
0 3
1 24
1 25
0 2
0 3
1 27
1 23
1 26
1 3
0 1
0 3
1 28
1 29
1 10
0 3
1 20
0 4
1 31
0 2
1 32
1 5
0 2
0 2
0 4
0 3
1 36
0 2
1 37
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 6
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

points 1.0 p = 1.00, C = 0, E = 2

Test #219:

score: 74
Accepted
time: 33ms
memory: 8844kb

input:

4
100000
0 2
0 8
0 1
0 1
1 2
1 4
0 4
1 5
0 1
1 6
0 3
1 3
0 3
1 8
0 7
1 9
0 6
0 3
1 10
1 7
0 8
0 3
0 3
1 14
0 2
1 15
0 4
0 3
0 6
1 16
0 6
0 7
0 2
0 3
0 5
1 19
0 4
0 6
1 24
1 23
1 17
1 22
1 18
1 20
0 5
0 6
0 4
0 3
0 8
0 4
0 7
1 28
1 29
1 30
1 26
0 8
1 33
1 25
0 1
1 34
0 5
0 1
0 1
1 36
0 1
1 35
0 5
1 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 2
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
0 -1
0 -1
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

points 1.0 p = 1.00, C = 0, E = 2

Test #220:

score: 74
Accepted
time: 28ms
memory: 8980kb

input:

4
100000
0 5
0 7
0 5
1 1
0 9
0 12
0 9
0 1
1 5
0 5
1 4
1 6
0 2
1 7
1 2
0 9
0 11
1 10
0 1
1 9
0 11
0 5
1 13
0 11
1 15
0 8
1 14
0 7
0 11
1 12
1 17
0 8
1 8
0 3
0 1
0 1
1 21
1 22
1 20
0 2
1 23
1 3
1 19
1 18
0 9
0 11
1 25
0 2
0 11
1 26
0 9
0 13
0 1
0 11
0 10
1 29
0 1
1 33
1 30
1 31
0 2
0 11
1 35
0 1
1 36
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 5
0 -1
1 5
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 5
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 5
0 -1
1 5
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 11
0 -1
0 -1
0 -1
0 -1
0...

result:

points 1.0 p = 1.00, C = 0, E = 2

Test #221:

score: 74
Accepted
time: 33ms
memory: 8952kb

input:

4
100000
0 5
0 9
0 7
1 3
0 4
1 2
0 1
0 2
1 6
1 5
0 4
0 4
0 1
1 8
0 4
1 10
0 8
0 12
0 5
1 12
1 11
0 1
1 14
0 1
1 15
0 1
0 4
1 13
0 1
1 18
0 3
1 19
0 1
0 3
1 17
1 7
1 21
1 9
0 12
0 2
1 22
1 23
1 1
0 8
0 3
1 24
0 12
1 26
0 3
0 2
0 3
1 27
0 3
1 30
0 4
1 28
0 7
0 1
0 9
1 33
1 34
1 32
1 29
0 1
1 4
0 1
1 2...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 5
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
1 4
1 4
0 -1
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

points 1.0 p = 1.00, C = 0, E = 2

Test #222:

score: 74
Accepted
time: 25ms
memory: 8892kb

input:

4
100000
0 8
0 11
0 2
1 2
0 20
0 11
0 15
1 3
1 1
0 9
1 4
1 7
0 18
0 11
1 9
0 16
1 8
0 8
0 3
1 12
0 5
0 6
1 14
0 8
0 20
0 6
0 10
1 16
1 15
0 6
0 2
0 1
1 21
1 17
1 10
0 9
1 22
1 19
1 18
1 5
0 9
1 23
0 14
0 4
1 25
0 7
0 6
0 9
0 18
0 8
1 26
1 28
0 11
0 8
1 32
0 3
1 27
0 19
1 34
0 5
0 16
0 16
0 3
1 36
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 8
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

points 1.0 p = 1.00, C = 0, E = 2

Test #223:

score: 74
Accepted
time: 33ms
memory: 8852kb

input:

4
100000
0 13
0 13
0 25
1 2
0 10
1 4
0 9
0 15
0 5
1 7
0 10
1 6
1 8
0 13
0 15
1 10
1 9
1 5
0 1
1 11
0 3
0 10
0 22
1 14
1 13
1 1
0 18
1 15
0 16
1 16
0 12
0 24
0 6
1 17
1 18
0 6
1 20
1 19
0 14
1 21
0 25
1 22
0 29
0 11
1 23
1 24
0 9
0 8
0 7
1 25
0 3
1 28
0 9
0 5
1 30
1 27
1 26
1 29
0 23
0 3
0 10
0 4
0 2...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 13
1 13
1 13
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 25
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

points 1.0 p = 1.00, C = 0, E = 2

Test #224:

score: 74
Accepted
time: 37ms
memory: 8956kb

input:

4
100000
0 3
0 2
0 3
0 3
1 1
0 2
0 3
1 5
0 3
0 4
0 4
1 7
1 8
1 2
0 4
0 4
1 11
1 10
0 4
0 4
0 3
1 14
0 3
1 15
1 12
0 4
0 4
1 13
0 4
0 4
1 19
0 2
0 3
1 20
1 21
1 18
0 3
0 4
0 3
0 4
0 4
1 22
1 23
1 24
1 26
0 2
0 4
1 28
1 25
1 17
0 4
1 29
1 6
0 4
1 30
1 3
0 4
0 3
0 4
1 32
0 4
0 4
0 4
1 35
0 3
0 3
0 4
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 3
0 -1
1 3
1 3
1 3
0 -1
1 3
1 3
1 3
1 3
1 3
0 -1
1 3
1 3
1 3
0 -1
1 3
1 3
1 3
0 -1
1 3
0 -1
1 3
0 -1
1 3
0 -1
1 4
0 -1
1 4
1 4
1 4
0 -1
0 -1
0 -1
1 4
0 -1
1 3
0 -1
1 3
0 -1
1 4
1 4
1 4
1 4
1 4
0 -1
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

points 1.0 p = 1.00, C = 0, E = 2

Test #225:

score: 74
Accepted
time: 31ms
memory: 8964kb

input:

4
100000
0 3
0 1
0 3
0 4
1 3
1 2
0 1
1 5
0 4
0 4
0 3
1 6
0 4
1 9
0 2
0 2
0 2
0 3
0 2
1 14
0 1
0 4
1 16
0 2
0 1
1 17
0 4
1 15
0 4
0 1
0 2
0 1
0 2
0 2
1 11
1 20
0 3
1 26
1 25
1 24
1 21
0 4
0 2
0 3
0 2
1 27
0 3
0 2
1 30
1 29
0 2
1 33
0 1
1 34
1 32
1 28
0 2
0 3
1 36
1 35
1 13
0 2
0 2
1 37
1 19
1 12
1 18...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 3
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
1 4
1 4
0 -1
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

points 1.0 p = 1.00, C = 0, E = 2

Test #226:

score: 74
Accepted
time: 34ms
memory: 8788kb

input:

4
100000
0 4
0 4
0 2
0 2
1 2
0 4
1 1
0 4
0 4
0 3
0 4
1 5
0 1
0 4
1 11
1 10
0 3
1 4
1 6
1 3
0 3
0 3
0 4
0 3
1 14
1 13
1 16
0 3
1 17
0 3
1 18
0 3
0 3
1 19
0 4
0 3
1 21
1 22
1 9
1 12
0 4
0 2
1 24
0 3
1 23
1 20
0 2
0 4
0 3
1 26
0 4
1 29
1 27
1 28
1 8
0 4
0 4
0 4
0 4
0 4
1 32
0 3
0 4
0 4
0 2
0 3
1 34
1 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 4
1 4
1 4
0 -1
1 2
0 -1
1 2
0 -1
1 4
0 -1
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
1 3
1 3
1 3
1 3
0 -1
1 4
0 -1
1 4
0 -1
1 4
0 -1
1 3
0 -1
1 4
0 -1
1 3
0 -1
1 3
0 -1
1 4
0 -1
1 4
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
1 4...

result:

points 1.0 p = 1.00, C = 0, E = 2

Test #227:

score: 74
Accepted
time: 32ms
memory: 8840kb

input:

4
100000
0 8
0 5
0 7
0 9
0 6
1 4
0 5
0 5
1 7
1 1
1 2
1 5
0 8
1 8
0 9
0 6
0 8
0 7
1 12
0 8
0 8
1 14
0 2
1 15
1 13
1 10
1 6
0 6
0 9
1 3
0 4
1 18
1 16
0 9
0 8
0 9
1 19
1 9
1 20
0 9
0 9
0 6
1 24
0 9
1 25
0 9
1 26
1 21
0 7
1 17
1 23
0 7
1 28
0 7
0 9
0 4
1 31
1 30
0 6
0 9
1 32
1 29
1 33
1 27
0 8
0 9
1 35
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 8
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 9
1 9
1 9
1 9
1 9
0 -1
1 9
1 9
1 9
1 9
1 9
1 9
1 9
1 9
1 9
1 9
1 9
0 -...

result:

points 1.0 p = 1.00, C = 0, E = 2

Test #228:

score: 74
Accepted
time: 30ms
memory: 8796kb

input:

4
100000
0 5
0 8
0 9
1 3
0 9
0 9
1 4
0 8
0 7
1 5
1 6
0 5
0 6
1 9
1 8
0 5
1 1
0 9
0 8
1 12
1 10
0 9
0 6
0 7
1 15
1 13
0 8
0 6
0 8
0 7
0 7
0 9
1 20
1 18
1 21
0 6
1 17
0 9
1 14
0 9
0 4
0 9
1 26
1 25
1 2
1 22
0 9
1 27
0 9
1 11
0 7
0 5
0 9
1 29
0 9
1 31
0 8
1 30
0 9
1 34
0 7
0 8
1 36
1 7
1 35
0 6
1 37
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 5
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 ...

result:

points 1.0 p = 1.00, C = 0, E = 2

Test #229:

score: 74
Accepted
time: 34ms
memory: 8848kb

input:

4
100000
0 13
0 9
0 12
1 2
0 9
1 4
0 3
0 13
1 5
1 6
0 9
0 8
1 7
0 12
1 8
0 9
0 13
1 11
0 15
0 14
1 10
0 15
1 12
0 6
1 14
0 14
1 9
1 13
0 14
0 11
0 15
0 12
1 17
1 18
1 20
0 4
1 21
0 15
0 15
1 23
1 22
0 14
0 15
0 15
1 26
0 6
1 27
0 12
0 13
1 28
0 8
0 13
0 15
1 32
0 11
1 24
1 25
0 12
0 13
1 34
1 35
0 1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 13
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 13
0 -1
0 -1
0 -1
0 -1
0 -1
1 12
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

points 1.0 p = 1.00, C = 0, E = 2

Test #230:

score: 74
Accepted
time: 30ms
memory: 8952kb

input:

4
100000
0 12
0 13
0 8
0 10
1 3
0 14
1 5
0 14
1 4
0 13
0 6
0 15
0 14
1 2
0 14
1 10
1 6
0 14
1 12
1 1
0 15
0 13
0 14
1 13
0 9
1 16
0 14
0 6
1 18
1 15
0 15
1 19
1 9
1 17
0 6
0 11
1 21
1 20
1 11
1 8
0 15
0 13
0 14
0 5
1 25
1 24
1 23
0 14
0 14
1 27
0 14
0 15
0 10
0 15
1 30
0 13
0 11
1 33
0 13
0 13
0 15
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 12
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 13
1 13
1 13
1 13
1 13
0 -1
1 13
1 13
1...

result:

points 1.0 p = 1.00, C = 0, E = 2

Test #231:

score: 74
Accepted
time: 26ms
memory: 8836kb

input:

4
100000
0 22
0 30
0 30
1 3
0 25
1 1
0 21
1 4
0 26
0 29
0 23
0 20
0 15
0 29
0 12
1 11
0 27
0 14
1 8
0 25
0 18
0 26
0 17
1 15
1 17
0 20
0 25
0 21
0 15
0 15
1 20
1 23
0 29
0 26
1 6
1 14
1 10
1 21
0 30
0 9
1 27
0 28
1 9
1 24
0 18
0 23
1 29
1 30
1 13
1 7
0 29
0 28
1 19
1 31
0 20
0 23
1 34
1 33
1 18
1 12...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 22
0 -1
1 30
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

points 1.0 p = 1.00, C = 0, E = 2

Test #232:

score: 74
Accepted
time: 29ms
memory: 8892kb

input:

4
100000
0 28
0 26
0 22
0 22
0 29
0 25
0 17
1 7
1 1
0 29
0 29
1 9
0 23
1 2
1 8
0 12
0 25
1 12
1 10
0 23
1 13
1 4
1 5
1 6
0 28
0 26
1 15
1 14
0 12
1 16
0 23
0 27
1 17
0 23
1 18
1 3
0 28
0 30
0 26
1 20
0 26
1 23
0 29
0 22
1 24
1 25
0 27
1 26
1 21
0 23
1 27
1 22
0 14
0 21
1 28
0 28
0 28
1 30
0 23
1 31
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 28
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 12
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

points 1.0 p = 1.00, C = 0, E = 2

Test #233:

score: 74
Accepted
time: 26ms
memory: 9028kb

input:

4
100000
0 31
0 35
0 29
0 20
1 4
1 2
0 49
1 3
0 48
1 6
0 48
1 1
0 35
1 5
0 45
1 9
0 44
0 48
1 11
1 7
0 43
1 12
0 28
0 43
1 13
1 14
0 39
0 28
1 15
0 37
0 25
1 17
0 8
0 46
1 18
0 40
1 21
0 35
1 22
0 36
0 43
0 48
1 25
1 23
0 47
0 32
0 43
0 40
0 40
0 43
1 27
0 42
1 26
0 43
1 24
0 33
1 28
0 38
0 45
1 36
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 31
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

points 1.0 p = 1.00, C = 0, E = 2

Test #234:

score: 74
Accepted
time: 33ms
memory: 8968kb

input:

4
100000
0 43
0 42
0 40
1 1
0 41
0 43
0 48
0 46
0 38
1 5
0 27
1 8
1 7
0 23
1 10
1 4
1 9
1 3
0 25
0 42
0 50
1 12
0 39
0 50
0 38
1 15
0 28
0 46
0 50
0 16
0 42
1 17
0 45
1 18
0 31
1 21
0 43
1 16
0 41
1 25
0 11
1 20
1 22
0 41
1 27
1 24
1 23
0 29
1 28
0 37
0 36
1 13
1 30
0 47
0 46
0 42
0 23
1 34
1 33
0 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 43
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

points 1.0 p = 1.00, C = 0, E = 2

Test #235:

score: 74
Accepted
time: 31ms
memory: 8832kb

input:

4
100000
0 9
0 7
0 10
1 1
0 10
1 3
0 7
1 5
0 9
1 6
0 10
0 9
0 10
1 8
1 7
0 5
1 9
1 10
0 9
1 11
0 4
0 10
0 7
0 10
0 7
0 10
0 10
1 12
1 18
0 7
1 19
1 13
1 17
1 14
1 15
0 4
1 16
1 20
0 9
0 9
0 10
0 9
0 10
0 8
0 9
0 10
0 8
1 24
0 10
0 8
0 8
1 22
0 6
0 10
0 7
0 9
1 35
1 36
1 25
0 8
1 28
0 10
1 29
0 10
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 9
0 -1
0 -1
0 -1
1 10
0 -1
1 7
0 -1
0 -1
0 -1
1 10
0 -1
1 10
1 10
1 10
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 10
1 10
1 10
0 -1
1 10
0 -1
1 7
0 -1
1 7
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

points 1.0 p = 1.00, C = 0, E = 2

Test #236:

score: 74
Accepted
time: 32ms
memory: 8964kb

input:

4
100000
0 3
0 2
0 3
0 3
1 3
0 1
1 2
1 4
0 4
0 2
1 7
1 6
0 1
1 8
0 2
1 1
0 3
1 10
0 1
0 4
1 12
1 11
0 2
0 4
0 1
1 15
0 4
1 16
1 5
0 4
1 17
1 14
0 4
0 2
1 19
1 18
0 1
0 2
0 1
1 20
0 3
1 22
1 21
1 23
0 2
1 13
0 2
0 4
0 3
0 1
1 27
1 26
1 28
0 1
1 29
1 25
0 3
1 30
0 4
0 2
0 4
0 2
1 31
1 33
1 34
1 32
0 4...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 3
0 -1
1 3
1 3
1 3
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
1 1
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
0 -1
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
0 -1
1 2
1 2
1 ...

result:

points 1.0 p = 1.00, C = 0, E = 2

Test #237:

score: 74
Accepted
time: 34ms
memory: 8940kb

input:

4
100000
0 8
0 17
0 16
1 1
0 16
1 4
0 9
1 2
0 17
0 14
0 17
1 7
1 5
0 17
0 17
0 14
0 14
1 11
1 12
0 15
1 10
1 8
1 6
1 9
0 15
1 14
0 16
0 7
0 18
0 17
0 11
0 8
0 15
0 18
0 5
1 17
0 18
1 22
1 19
0 15
1 25
1 18
1 23
1 20
1 16
0 17
0 12
0 16
0 17
0 8
0 10
0 15
1 29
0 8
0 15
1 34
1 32
0 18
1 26
0 13
0 15
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 8
0 -1
0 -1
0 -1
1 16
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 17
1 17
1 17
1 17
1 17
1 17
1 17
1 17
1 17
0 -1
0 -1
0 -1
1 15
0 -1
1 16
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

points 1.0 p = 1.00, C = 0, E = 2

Test #238:

score: 74
Accepted
time: 32ms
memory: 8804kb

input:

4
100000
0 38
0 40
0 38
0 34
0 35
0 39
0 40
0 39
1 7
0 40
1 2
1 5
0 38
1 10
0 39
1 6
1 3
1 8
0 38
1 9
1 4
0 39
0 40
1 14
0 38
0 40
1 15
1 13
1 11
1 1
0 30
1 17
0 30
1 18
0 34
0 40
1 19
1 20
0 40
1 21
0 39
1 12
0 39
0 37
1 23
0 40
1 25
1 24
0 39
0 38
0 38
0 39
1 29
0 40
0 39
0 40
0 40
1 31
0 39
0 40
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 38
0 -1
1 38
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 38
0 -1
0 -1
0 -1
1 38
0 -1
0 -1
0 -1
1 38
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 40
0 -1
1 40
0 -1
0 -1
0 -1
1 39
0 -1
0 -1
0 -1
0...

result:

points 1.0 p = 1.00, C = 0, E = 2

Test #239:

score: 74
Accepted
time: 35ms
memory: 8944kb

input:

4
100000
0 103
0 103
0 106
0 110
0 109
1 5
1 3
0 109
1 6
0 110
0 105
1 2
0 101
0 98
0 107
0 104
0 102
1 11
1 9
0 105
1 14
1 13
1 4
0 101
1 15
0 99
1 16
0 107
1 10
0 110
1 18
0 108
0 104
0 108
0 103
1 20
0 110
0 92
0 104
1 24
0 109
1 25
0 108
0 105
1 28
1 17
1 23
0 110
1 29
1 7
1 1
1 21
1 8
0 107
0 1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 103
1 103
1 103
0 -1
0 -1
0 -1
1 103
0 -1
1 103
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

points 1.0 p = 1.00, C = 0, E = 2

Test #240:

score: 74
Accepted
time: 38ms
memory: 8804kb

input:

4
100000
0 29
0 29
0 28
1 1
0 30
1 2
0 28
0 30
1 3
1 5
0 30
1 7
0 30
1 8
0 29
0 28
0 30
1 10
1 11
0 28
0 28
1 4
1 13
0 26
0 28
1 15
1 12
1 6
0 28
0 30
1 14
1 16
0 29
1 18
0 30
1 17
0 30
0 30
0 30
1 21
1 20
0 30
0 30
0 30
1 25
0 30
1 24
1 26
0 29
0 29
0 30
1 28
0 28
0 29
1 31
0 26
1 32
1 30
1 22
0 30...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 29
1 29
1 29
0 -1
0 -1
0 -1
1 28
0 -1
1 30
1 30
1 30
1 30
1 30
1 30
1 30
0 -1
1 30
1 30
1 30
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 29
0 -1
1 30
0 -1
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1...

result:

points 1.0 p = 1.00, C = 0, E = 2

Test #241:

score: 74
Accepted
time: 29ms
memory: 8924kb

input:

4
100000
0 26
0 4
0 4
0 16
1 4
0 6
0 19
0 12
0 5
1 8
0 6
1 5
0 10
0 1
1 11
1 9
1 3
1 6
0 9
0 1
0 4
1 12
0 1
0 2
1 16
0 1
1 15
0 3
1 18
1 14
1 13
1 10
1 1
1 17
0 2
0 6
0 2
0 9
0 4
0 19
0 19
1 23
1 22
1 25
1 20
1 21
1 2
0 2
0 10
1 27
1 26
0 1
1 28
1 19
0 1
0 15
1 30
0 7
0 2
1 32
1 31
1 29
0 17
0 28
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 26
0 -1
1 4
0 -1
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

points 1.0 p = 1.00, C = 0, E = 2

Test #242:

score: 74
Accepted
time: 30ms
memory: 8804kb

input:

4
100000
0 1
0 1
0 3
1 3
0 5
0 1
1 5
1 4
0 9
0 3
1 2
0 2
1 8
1 7
0 1
0 3
1 10
0 9
0 1
0 4
0 1
0 4
1 12
0 2
0 3
0 1
0 4
0 2
0 4
0 2
0 1
1 14
1 21
0 2
1 22
0 7
0 1
1 25
0 1
1 11
0 4
1 24
1 28
1 27
1 19
0 2
0 1
1 29
0 1
1 31
1 1
1 26
1 23
0 7
1 32
1 30
1 9
1 13
0 6
1 33
0 2
0 1
1 35
0 4
1 36
0 4
0 2
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
1 1
0 -1
1 1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
...

result:

points 1.0 p = 1.00, C = 0, E = 2

Test #243:

score: 74
Accepted
time: 34ms
memory: 9032kb

input:

4
100000
0 2
0 3
0 8
0 11
1 2
0 4
0 4
0 1
1 6
0 1
0 1
0 16
0 4
1 11
0 3
0 3
1 13
0 7
1 10
1 9
1 12
1 5
1 8
0 6
1 7
1 15
1 4
0 3
0 2
0 4
0 5
0 2
0 5
1 19
0 1
1 18
1 22
0 9
0 1
1 23
0 1
0 2
0 1
0 1
0 1
1 29
0 2
0 1
0 4
0 5
0 5
1 25
1 26
1 27
1 32
1 30
0 1
1 28
1 17
1 33
1 35
0 1
0 1
0 1
1 36
1 31
0 3
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

points 1.0 p = 1.00, C = 0, E = 2

Test #244:

score: 74
Accepted
time: 29ms
memory: 8856kb

input:

4
100000
0 5
0 1
0 15
1 3
0 1
0 51
0 15
1 6
0 22
1 5
0 10
1 4
1 8
1 2
0 29
1 9
0 5
1 1
0 19
0 29
1 12
0 5
1 13
0 4
0 27
1 14
0 16
0 1
0 24
0 12
1 17
1 19
1 18
0 7
1 20
1 7
0 27
0 9
1 22
1 15
1 16
0 44
1 23
1 10
0 3
1 24
0 18
1 25
0 2
0 11
1 26
0 16
1 27
1 28
0 11
0 14
1 29
1 21
0 12
1 31
0 60
0 5
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 5
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 5
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1...

result:

points 1.0 p = 1.00, C = 0, E = 2

Test #245:

score: 74
Accepted
time: 29ms
memory: 8844kb

input:

4
100000
0 56
0 22
0 4
0 13
0 31
0 24
0 69
1 2
1 4
1 3
0 1
1 1
1 8
0 13
0 9
1 10
0 23
1 11
0 24
1 7
1 5
1 6
0 8
0 39
1 14
1 13
0 7
1 9
0 12
0 30
1 16
0 23
0 8
1 19
1 17
0 4
1 20
0 4
1 18
1 21
0 14
1 22
0 14
0 20
1 23
1 24
0 30
0 39
0 4
0 3
1 27
0 1
0 10
0 15
0 8
0 5
0 25
1 33
1 28
1 31
0 4
1 35
1 26...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 56
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 24
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

points 1.0 p = 1.00, C = 0, E = 2

Test #246:

score: 74
Accepted
time: 26ms
memory: 8892kb

input:

4
100000
0 27
0 10
0 9
1 1
0 13
0 51
0 13
0 12
1 5
1 2
1 3
1 4
0 2
1 7
0 49
0 3
0 27
0 11
0 1
1 13
1 10
1 6
0 17
1 14
0 22
1 15
0 18
1 16
1 11
0 28
1 17
1 8
0 3
1 9
0 6
1 19
0 2
0 3
0 11
0 2
0 7
1 21
0 14
0 28
1 26
1 20
0 12
1 27
0 37
1 23
1 25
1 24
1 22
1 18
0 10
1 29
0 12
1 30
0 8
0 7
1 31
1 32
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 27
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 13
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

points 1.0 p = 1.00, C = 0, E = 2

Test #247:

score: 74
Accepted
time: 29ms
memory: 9012kb

input:

4
100000
0 1
0 6
0 5
0 1
1 3
1 2
0 2
0 6
0 9
0 7
1 6
0 7
1 7
1 9
1 8
0 7
0 2
1 11
0 6
1 10
1 5
1 12
0 3
1 1
0 5
0 1
0 8
1 14
0 7
0 7
0 7
1 18
0 4
1 20
0 2
0 9
0 3
1 22
0 6
1 24
1 17
0 1
1 25
0 3
0 4
0 5
0 2
0 8
1 30
0 4
0 6
1 32
1 31
1 26
1 27
0 3
0 8
1 33
0 9
0 1
1 34
0 3
1 37
1 29
1 16
0 3
0 3
0 8...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 1
0 -1
0 -1
0 -1
1 1
1 1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
1 1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1...

result:

points 1.0 p = 1.00, C = 0, E = 2

Test #248:

score: 74
Accepted
time: 29ms
memory: 9036kb

input:

4
100000
0 3
0 2
0 9
1 2
0 8
0 7
0 5
0 56
1 3
0 19
0 40
0 2
0 39
1 11
1 10
0 13
1 6
1 4
1 1
0 39
0 22
0 18
0 7
0 27
0 9
1 15
0 13
0 15
0 18
1 18
1 21
1 14
1 13
0 1
0 4
0 2
1 22
1 9
1 5
0 2
0 18
0 2
1 25
1 27
0 15
0 6
0 1
0 15
0 27
0 29
1 28
1 33
0 24
1 34
1 31
1 29
0 3
1 35
0 17
0 52
1 36
0 22
1 38
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

points 1.0 p = 1.00, C = 0, E = 2

Test #249:

score: 74
Accepted
time: 33ms
memory: 8804kb

input:

4
100000
0 5
0 8
0 7
1 3
0 14
0 39
1 1
1 4
0 8
1 6
0 33
0 42
0 51
1 8
1 9
0 15
1 10
1 2
0 12
0 23
1 12
1 7
0 19
1 13
0 1
0 12
1 15
0 1
0 3
1 17
1 16
0 6
1 18
0 33
0 1
0 22
1 19
1 20
0 33
0 4
1 23
1 22
0 14
0 20
0 4
1 24
0 4
0 4
1 28
0 3
0 2
0 14
0 7
1 31
1 27
0 20
1 33
0 1
0 9
1 34
0 14
0 32
1 35
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 5
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 8
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

points 1.0 p = 1.00, C = 0, E = 2

Test #250:

score: 74
Accepted
time: 33ms
memory: 9032kb

input:

4
100000
0 9
0 23
0 6
1 2
0 26
1 3
0 7
1 5
0 20
0 1
1 7
1 6
0 4
1 4
0 1
0 7
1 10
1 9
0 42
0 2
0 16
0 4
0 16
1 13
0 46
1 15
0 2
1 16
0 30
1 18
1 14
0 1
0 26
1 19
0 9
1 21
0 49
0 8
0 17
1 24
1 23
0 8
1 25
0 8
1 22
0 9
1 27
0 2
1 28
0 17
1 29
0 12
0 9
1 30
1 31
0 27
1 32
0 1
1 33
0 1
0 1
0 47
1 34
1 17...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 9
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

points 1.0 p = 1.00, C = 0, E = 2

Test #251:

score: 74
Accepted
time: 32ms
memory: 8964kb

input:

4
100000
0 12
0 4
0 9
0 3
0 11
0 1
1 4
0 8
0 2
0 1
1 9
0 6
0 2
1 11
1 3
1 7
0 4
1 6
1 12
1 10
1 2
0 3
1 13
1 8
0 2
0 2
1 14
1 15
0 8
1 16
0 3
0 10
0 1
1 17
0 10
0 7
1 21
0 6
0 11
0 8
0 6
1 24
1 23
1 25
0 2
0 2
0 4
1 27
1 22
0 1
1 29
1 18
1 28
1 20
1 26
0 6
1 30
0 19
0 2
1 32
1 19
0 2
0 8
1 33
0 3
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 12
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

points 1.0 p = 1.00, C = 0, E = 2

Test #252:

score: 74
Accepted
time: 33ms
memory: 8792kb

input:

4
100000
0 1
0 11
0 8
0 4
0 3
1 4
1 5
1 3
0 6
0 14
0 2
0 10
1 6
1 9
1 8
0 3
1 10
0 1
0 2
0 4
0 8
0 2
0 1
0 3
0 1
0 2
0 15
1 15
1 18
0 6
1 12
0 14
1 20
0 2
1 14
1 19
0 8
0 3
1 24
1 11
1 25
1 22
0 1
0 6
0 8
0 3
1 26
0 6
1 30
0 2
1 28
1 16
1 13
0 2
0 3
1 32
1 33
0 2
0 5
1 35
0 1
1 36
0 1
0 6
1 38
1 34
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

points 1.0 p = 1.00, C = 0, E = 2

Test #253:

score: 74
Accepted
time: 30ms
memory: 8852kb

input:

4
100000
0 29
0 23
0 1
1 2
0 11
0 24
0 2
1 6
0 36
1 3
1 7
0 15
0 12
1 9
1 8
0 20
1 10
1 4
0 1
1 11
0 26
1 12
0 2
1 13
0 6
0 24
0 18
1 16
0 15
0 2
1 15
1 18
0 30
1 17
0 7
0 53
1 20
1 21
1 19
1 14
0 19
1 22
0 12
1 23
0 12
0 21
0 15
0 2
0 5
1 28
1 27
1 26
0 1
1 29
1 25
0 10
0 12
0 5
1 30
1 31
1 32
0 3
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 29
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

points 1.0 p = 1.00, C = 0, E = 2

Test #254:

score: 74
Accepted
time: 33ms
memory: 8880kb

input:

4
100000
0 1
0 3
0 49
0 5
1 4
0 7
1 3
0 26
0 4
1 1
0 1
1 8
1 7
1 6
0 7
1 9
0 9
0 5
1 11
1 10
0 17
1 12
0 1
0 5
1 13
0 37
0 14
1 14
1 16
0 5
1 17
1 2
0 2
0 6
0 3
0 21
0 13
1 19
1 18
1 21
1 20
1 22
0 11
1 23
0 8
1 5
0 3
1 25
0 1
1 26
0 21
1 27
0 1
0 3
1 29
1 28
0 5
1 30
0 24
0 1
1 32
1 31
0 20
1 33
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 7
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

points 1.0 p = 1.00, C = 0, E = 2

Test #255:

score: 74
Accepted
time: 34ms
memory: 8964kb

input:

4
100000
0 498
0 492
0 475
0 495
1 1
1 4
0 497
0 484
1 6
1 5
0 497
0 492
1 7
1 3
0 483
1 8
0 500
1 10
0 488
1 11
0 492
0 489
0 488
0 493
0 490
1 15
0 500
0 497
0 477
1 17
0 493
1 14
1 16
1 19
1 12
0 491
1 21
1 20
0 499
1 22
1 13
1 9
0 493
0 479
0 491
0 493
1 25
0 489
0 497
1 27
0 497
0 492
1 29
1 30...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 498
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 492
1 492
1 492
0 -1
0 -1
0 -1
0 -1
0 -1
1 492
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

points 1.0 p = 1.00, C = 0, E = 2

Test #256:

score: 74
Accepted
time: 35ms
memory: 8852kb

input:

4
100000
0 496
0 474
0 480
0 493
0 490
1 5
1 1
1 4
0 495
1 6
0 500
1 7
0 495
1 2
0 497
1 8
0 492
1 10
0 500
0 496
1 11
0 485
0 498
0 478
0 484
0 491
1 16
1 17
0 498
0 498
1 19
0 500
0 491
0 495
0 496
1 22
1 23
0 491
1 20
1 18
0 491
1 13
1 14
1 25
1 15
0 477
1 21
0 500
1 27
0 491
1 28
0 477
1 29
1 26...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 496
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

points 1.0 p = 1.00, C = 0, E = 2

Test #257:

score: 74
Accepted
time: 36ms
memory: 8800kb

input:

4
100000
0 498
0 499
0 495
0 497
0 500
0 497
1 2
0 500
0 495
1 7
0 500
0 500
1 6
0 498
0 500
1 11
1 5
0 498
0 494
0 500
0 500
1 15
0 491
1 8
0 497
0 499
0 499
0 494
0 499
1 21
0 498
0 497
0 497
0 490
0 499
1 23
1 27
0 497
0 494
0 499
1 28
1 30
0 499
1 20
0 495
0 498
0 498
1 34
0 499
1 35
0 499
0 493...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 498
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

points 1.0 p = 1.00, C = 0, E = 2

Test #258:

score: 74
Accepted
time: 29ms
memory: 9012kb

input:

4
100000
0 5
0 7
0 1
0 2
1 3
1 2
0 9
0 4
1 6
0 1
1 5
1 4
0 1
1 1
0 5
1 7
0 1
1 10
0 4
1 11
0 4
0 8
1 12
0 2
0 1
1 15
0 7
1 13
1 16
0 1
1 14
0 7
1 9
1 8
0 1
1 19
0 4
1 20
0 1
1 21
0 8
0 6
1 22
1 23
0 1
1 24
0 4
0 6
1 25
1 26
0 2
0 6
0 5
1 29
0 5
0 6
1 31
0 6
0 8
0 9
0 1
0 3
1 35
0 3
0 3
0 6
0 2
0 9
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 5
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
1 1
1 1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
1 1
0 -1
1 1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
0...

result:

points 1.0 p = 1.00, C = 0, E = 2

Test #259:

score: 74
Accepted
time: 39ms
memory: 8804kb

input:

4
100000
0 495
0 494
0 496
0 500
1 4
1 2
0 497
0 497
1 6
1 5
0 500
0 500
1 8
0 500
0 499
1 10
0 498
1 9
1 11
1 1
0 498
0 499
0 495
1 13
1 12
0 495
1 15
1 14
0 496
0 500
0 500
1 17
1 18
0 500
0 497
1 16
1 20
1 7
0 499
1 19
0 498
1 22
0 500
1 23
0 500
0 497
0 498
1 26
0 500
0 498
0 496
0 486
0 497
0 5...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 495
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 496
0 -1
1 500
0 -1
1 496
0 -1
0 -1
0 -1
1 500
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

points 1.0 p = 1.00, C = 0, E = 2

Test #260:

score: 74
Accepted
time: 37ms
memory: 8884kb

input:

4
100000
0 500
0 500
0 498
1 2
0 499
0 500
1 4
1 3
0 498
1 6
0 500
1 1
0 499
0 497
0 499
0 490
1 11
1 5
0 499
1 12
1 9
0 499
0 500
0 498
1 14
0 500
1 15
1 10
1 8
0 500
1 17
1 16
0 500
0 499
1 18
1 19
0 496
0 500
0 500
0 500
1 20
1 22
1 23
0 498
1 24
1 21
0 495
0 499
1 25
0 499
0 495
1 28
0 499
0 498...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 500
1 500
1 500
0 -1
0 -1
0 -1
1 500
1 500
1 500
1 500
1 500
1 500
1 500
0 -1
0 -1
0 -1
0 -1
0 -1
1 499
0 -1
1 499
1 499
1 499
0 -1
1 499
0 -1
1 499
0 -1
1 500
1 500
1 500
0 -1
1 500
0 -1
1 499
0 -1
0 -1
0 -1
1 500
1 500
1 500
1 ...

result:

points 1.0 p = 1.00, C = 0, E = 2

Test #261:

score: 74
Accepted
time: 34ms
memory: 8796kb

input:

4
100000
0 500
0 498
0 498
1 2
0 498
0 498
1 3
1 4
0 500
1 6
0 497
1 5
0 500
0 499
1 9
0 497
1 10
1 1
0 500
0 500
0 499
1 12
0 497
0 500
0 499
1 16
0 499
1 13
0 498
1 18
1 11
0 498
0 494
1 19
1 20
0 495
0 500
0 500
0 496
1 24
0 500
1 22
0 493
1 23
0 498
1 27
0 497
0 500
0 500
1 28
1 30
1 21
0 490
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 500
0 -1
1 498
0 -1
1 498
1 498
1 498
0 -1
1 500
0 -1
0 -1
0 -1
1 500
0 -1
1 500
0 -1
1 500
0 -1
1 500
1 500
1 500
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 500
0 -1
0 -1
0 -...

result:

points 1.0 p = 1.00, C = 0, E = 2

Test #262:

score: 74
Accepted
time: 37ms
memory: 8800kb

input:

4
100000
0 1
0 1
0 2
1 3
0 4
1 4
0 1
1 5
0 2
0 2
0 7
1 8
0 1
0 5
1 10
0 3
0 3
0 1
1 13
1 7
1 12
1 6
0 1
0 1
0 2
0 1
0 1
0 2
0 1
1 9
1 11
0 3
0 4
0 2
1 21
0 2
1 24
1 23
1 18
0 1
1 25
1 14
1 22
1 2
0 1
1 26
1 19
0 2
0 1
0 1
1 28
0 1
0 2
1 30
1 31
0 1
0 6
0 1
0 2
0 1
0 2
1 33
1 34
0 3
1 38
0 1
1 39
0 2...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
0 -1
0 -1
0 -1
1 1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 ...

result:

points 1.0 p = 1.00, C = 0, E = 2

Test #263:

score: 74
Accepted
time: 34ms
memory: 8800kb

input:

4
100000
0 2
0 1
0 2
1 3
0 1
0 3
0 1
0 1
1 7
0 2
0 1
1 8
1 6
1 5
1 1
1 4
0 4
1 10
0 1
1 11
0 5
0 5
1 12
0 1
1 14
1 9
0 3
1 15
0 1
1 16
0 6
1 17
0 1
1 18
0 1
0 5
0 1
1 19
1 13
0 2
0 1
0 1
1 24
0 4
1 25
1 22
1 21
0 1
0 1
0 4
1 28
0 3
0 2
1 29
0 1
1 31
0 1
0 2
0 1
1 32
1 34
1 30
1 26
0 7
0 4
0 1
1 35
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 2
0 -1
1 2
0 -1
1 1
0 -1
1 1
1 1
1 1
0 -1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
0 -1
1 1
1 1
1 1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
1 1
0 -1
1 1
0 -1
1 1
0 -1
1 1
0 -1
1 1
1 1
1 1
0 -1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1...

result:

points 1.0 p = 1.00, C = 0, E = 2

Test #264:

score: 74
Accepted
time: 36ms
memory: 8872kb

input:

4
100000
0 38496
0 28657
0 99999
0 3492
0 37198
0 99999
0 9121
0 99999
0 14736
0 99999
0 99999
0 3806
0 12056
0 4064
0 17327
0 99999
0 99999
0 99999
0 32226
0 42793
0 19296
0 4359
0 99999
0 99999
0 99999
0 6376
0 99999
0 845
0 7497
0 99999
0 2775
0 27387
0 99999
0 26311
0 21134
0 21357
0 99999
0 999...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 38496
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

points 1.0 p = 1.00, C = 0, E = 2

Test #265:

score: 74
Accepted
time: 34ms
memory: 8852kb

input:

4
100000
0 42066
1 1
0 70896
1 2
0 12882
1 3
0 14262
1 4
0 33777
1 5
0 29602
1 6
0 6156
1 7
0 97129
1 8
0 46108
1 9
0 38209
1 10
0 65262
1 11
0 76272
1 12
0 29427
1 13
0 7461
1 14
0 56340
1 15
0 28588
1 16
0 5737
1 17
0 80668
1 18
0 60075
1 19
0 90068
1 20
0 94055
1 21
0 18278
1 22
0 7892
1 23
0 467...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 0
1 42066
0 -1
1 70896
0 -1
1 12882
0 -1
1 14262
0 -1
1 33777
0 -1
1 29602
0 -1
1 6156
0 -1
1 97129
0 -1
1 46108
0 -1
1 38209
0 -1
1 65262
0 -1
1 76272
0 -1
1 29427
0 -1
1 7461
0 -1
1 56340
0 -1
1 28588
0 -1
1 5737
0 -1
1 80668
0 -1
...

result:

points 1.0 p = 1.00, C = 0, E = 0

Test #266:

score: 74
Accepted
time: 36ms
memory: 8792kb

input:

4
100000
0 99999
0 4542
0 36620
0 99999
0 45255
0 99999
0 22573
0 99999
0 36366
0 99999
0 99999
0 99999
1 7
0 43042
1 1
0 4122
0 99999
1 13
0 99999
0 45038
0 99999
0 35784
0 99999
0 99999
0 43824
1 22
1 18
0 16366
0 4955
0 4381
0 99999
0 41981
0 43593
0 11497
0 23367
0 2774
0 99999
1 32
0 99999
0 99...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 99999
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 99999
1 99999
1 99999
1 99999
1 99999
0 -1
1 99999
1 99999
1 99999
1 99999
1 99999
1 99999
1 99999
1 99999
1 99999
1 99999
1 99999
1 99999
1 99999
0 -1
1 99999
0 -1
0 -1
0 -1
0...

result:

points 1.0 p = 1.00, C = 0, E = 2

Test #267:

score: 74
Accepted
time: 35ms
memory: 8856kb

input:

4
100000
0 3
0 2
0 1
0 1
0 2
0 1
0 2
0 3
1 7
0 1
1 6
1 1
1 5
1 4
0 4
1 2
1 9
0 2
1 3
0 2
1 11
1 12
0 1
1 13
0 3
1 14
0 4
0 3
1 16
0 3
0 3
0 4
0 1
1 20
0 4
1 19
1 17
0 1
1 22
0 4
1 8
0 3
0 4
0 3
0 3
1 25
1 26
0 4
0 2
1 28
0 1
1 30
0 2
1 31
1 29
0 1
1 32
1 24
0 2
0 3
1 34
1 33
1 10
1 23
1 21
0 1
1 35
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
0 -1
1 4
0 -1
1 4
0 -1
1 3
0 -1
0 -1
0 -1
1 4
0 -1
1 4
0 -1
1 4
1 4
1 4
1 4
1 4
1 4
1 4
0 -1
1 4
1 4
1 4
0 -1...

result:

points 1.0 p = 1.00, C = 0, E = 2

Test #268:

score: 74
Accepted
time: 31ms
memory: 8956kb

input:

4
100000
0 3
0 4
0 1
1 1
0 4
0 3
0 2
0 3
1 5
0 3
1 2
0 2
1 7
0 2
0 2
1 11
0 1
1 12
0 4
1 13
1 3
0 3
1 14
0 3
0 2
1 4
1 9
0 4
1 17
0 3
1 18
0 3
1 10
0 1
0 3
0 3
1 20
0 3
0 4
1 24
1 22
1 23
1 16
1 8
1 19
1 21
0 4
0 1
1 25
0 2
1 27
1 26
0 3
1 28
0 3
1 29
0 1
0 2
0 3
1 30
1 31
0 3
1 33
0 3
1 34
1 6
0 3
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 3
0 -1
0 -1
0 -1
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
0 -1
1 2
0 -1
1 2
1 2
1 2
0 -1
1 2
0 -1
1 2
0 -1
1 3
0 -1
1 3
1 3
1 3
1 3
1 3
1 3
1 3
1 3
1 3
1 3
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

points 1.0 p = 1.00, C = 0, E = 2

Test #269:

score: 74
Accepted
time: 33ms
memory: 8944kb

input:

4
100000
0 9
0 8
0 7
0 6
1 4
0 5
0 8
0 7
0 2
1 7
0 3
1 9
1 6
0 9
1 10
1 1
1 5
0 2
0 3
0 3
0 1
1 11
0 2
1 12
0 3
0 2
0 4
1 18
1 17
1 15
0 1
1 19
0 2
0 6
0 8
1 22
1 21
1 20
0 5
0 8
0 4
1 25
1 24
0 9
0 6
0 3
0 3
0 9
1 27
0 3
0 9
1 31
0 5
1 32
0 9
1 34
0 6
0 1
1 36
0 2
0 9
0 9
1 37
1 39
0 4
0 5
1 40
0 8...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 9
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

points 1.0 p = 1.00, C = 0, E = 2

Test #270:

score: 74
Accepted
time: 28ms
memory: 9012kb

input:

4
100000
0 7
0 2
0 1
1 2
0 2
0 7
0 4
0 4
1 5
1 6
1 3
0 4
1 8
0 5
0 4
1 9
0 3
1 11
0 3
0 4
0 4
1 12
0 2
0 5
1 16
0 7
1 15
0 1
0 3
0 7
0 6
1 18
1 21
1 13
0 5
1 14
0 2
1 23
0 6
1 17
1 24
1 10
1 19
1 1
0 1
0 3
1 26
0 1
1 25
1 27
0 4
0 1
0 5
1 30
0 5
1 31
0 7
0 2
1 32
1 33
0 4
0 3
1 34
0 8
0 4
0 4
1 37
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 7
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
1 4
1 4
0 -1
1 4
0 -1
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

points 1.0 p = 1.00, C = 0, E = 2

Test #271:

score: 74
Accepted
time: 33ms
memory: 8800kb

input:

4
100000
0 4
0 8
0 5
1 3
0 1
1 2
0 6
1 1
0 6
0 7
0 7
1 4
0 1
1 6
1 7
1 5
0 2
0 6
0 6
0 1
0 8
0 6
1 14
0 5
1 16
1 15
1 13
1 9
1 10
1 8
0 2
1 17
0 1
0 6
1 18
1 12
0 4
1 20
0 2
1 21
0 4
1 22
0 2
0 8
1 24
1 23
0 7
0 2
0 8
0 5
1 25
1 26
1 27
0 5
0 7
1 29
0 7
1 30
0 2
1 31
1 32
0 1
0 1
0 1
1 34
0 8
1 36
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 6
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 6
1 6
1 6
1 6
1 6
1 6
1 6
1 6
1 6
1 6
1 6
1 6
1 6
1 6
1 6
0 -1
1 6
1 6
1 6
0 -1
0 -1
0 -1
0...

result:

points 1.0 p = 1.00, C = 0, E = 2

Test #272:

score: 74
Accepted
time: 33ms
memory: 8832kb

input:

4
100000
0 29
0 30
0 26
1 1
0 8
1 3
0 3
0 26
0 3
1 5
1 7
0 17
1 8
1 2
0 21
0 7
0 13
1 9
0 23
1 11
1 12
0 17
0 23
0 25
1 13
0 24
0 19
0 30
1 15
0 14
1 19
0 6
0 29
1 21
1 18
0 27
1 17
1 10
1 14
0 5
1 23
1 22
1 20
1 4
0 30
0 15
0 22
1 26
1 24
1 16
0 6
1 27
0 15
1 28
0 31
0 32
1 30
0 7
1 31
1 29
0 8
0 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 29
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

points 1.0 p = 1.00, C = 0, E = 2

Test #273:

score: 74
Accepted
time: 30ms
memory: 9016kb

input:

4
100000
0 9
0 3
0 14
1 3
0 8
0 25
1 4
0 29
0 5
0 25
1 7
1 1
1 2
1 6
0 19
0 4
1 10
1 9
0 15
1 11
0 32
0 13
0 10
0 14
0 27
0 32
1 13
1 12
1 16
0 1
0 1
0 11
1 19
1 18
1 17
0 8
1 21
1 15
0 30
0 4
0 18
0 32
0 30
0 23
0 26
1 28
1 23
0 8
1 27
1 29
0 28
1 26
1 24
0 4
1 31
0 24
1 32
0 32
0 19
0 8
0 20
1 36
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 9
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 25
1 25
1 25
0 -1
1 25
1 25
1 25
1 25
1 25
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

points 1.0 p = 1.00, C = 0, E = 2

Test #274:

score: 74
Accepted
time: 31ms
memory: 8948kb

input:

4
100000
0 4
0 1
0 3
0 4
0 3
0 3
0 4
0 4
1 1
1 5
1 3
0 4
0 2
1 10
1 7
1 4
1 6
1 2
0 3
1 8
0 1
0 2
0 2
0 3
1 12
0 2
0 1
0 4
0 4
0 2
1 20
1 16
0 3
0 1
1 21
1 17
0 4
1 23
1 13
1 19
0 4
0 1
0 2
1 26
0 2
1 27
1 24
0 2
0 1
0 2
1 28
1 30
1 25
1 9
1 15
0 3
0 3
0 2
0 2
1 34
0 1
0 4
0 2
1 37
0 3
1 35
1 38
1 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
1 4
1 4
1 4
1 4
0 -1
1 4
1 4
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

points 1.0 p = 1.00, C = 0, E = 2

Test #275:

score: 74
Accepted
time: 31ms
memory: 8968kb

input:

4
100000
0 4
0 2
0 3
0 4
0 1
1 5
0 2
0 3
1 7
0 3
0 2
0 1
0 2
1 3
1 10
0 3
0 3
1 2
1 11
1 4
1 8
1 12
0 4
0 4
1 14
0 1
1 16
0 4
0 1
0 3
0 3
1 18
0 2
0 1
0 2
1 21
1 23
1 20
0 2
1 24
1 22
0 3
1 25
0 4
0 1
1 27
0 1
1 28
0 3
1 26
0 2
0 4
1 30
1 31
1 29
0 4
1 32
0 3
0 4
0 3
1 33
0 4
0 3
0 4
1 38
0 1
1 39
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

points 1.0 p = 1.00, C = 0, E = 2

Test #276:

score: 74
Accepted
time: 30ms
memory: 8952kb

input:

4
100000
0 6
0 8
0 3
1 2
0 2
1 4
0 6
0 8
1 5
1 1
0 6
0 2
1 7
0 6
1 9
1 8
0 1
0 5
1 10
0 1
1 11
0 1
0 4
0 7
0 1
1 16
1 14
1 13
1 12
0 8
1 3
0 1
1 18
0 5
1 19
1 15
0 6
0 3
1 21
0 1
1 20
0 5
0 2
0 7
1 23
1 17
1 24
1 6
0 5
1 26
0 2
1 27
0 4
0 6
1 29
1 28
0 3
1 30
0 5
0 4
0 1
1 33
0 2
1 34
0 6
1 31
0 4
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 6
0 -1
0 -1
0 -1
0 -1
0 -1
1 6
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 8
0 -1
1 8
0 -1
1 8
1 8
1 8
0 -1
1 8
0 -1
1 8
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

points 1.0 p = 1.00, C = 0, E = 2

Test #277:

score: 74
Accepted
time: 33ms
memory: 8940kb

input:

4
100000
0 2
0 6
0 7
1 1
0 1
0 2
1 4
0 2
1 6
1 5
0 6
1 7
0 3
0 8
0 4
0 5
1 10
0 3
1 12
0 2
0 8
0 2
1 13
1 3
0 3
0 1
0 2
0 1
1 16
0 1
1 18
1 14
0 6
1 21
1 15
1 8
1 20
1 17
1 9
0 3
0 8
1 23
0 5
0 6
1 22
0 7
1 26
0 3
1 24
0 4
0 3
1 28
0 4
0 6
0 1
1 30
1 31
1 29
1 25
0 1
0 4
1 32
0 4
0 4
1 36
0 3
0 5
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 6
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

points 1.0 p = 1.00, C = 0, E = 2

Test #278:

score: 74
Accepted
time: 33ms
memory: 9012kb

input:

4
100000
0 28
0 11
0 20
1 2
0 32
0 6
0 8
0 32
1 4
0 30
0 24
1 7
0 27
0 8
0 23
1 6
0 9
1 11
0 9
0 31
1 14
1 10
0 18
0 18
1 17
1 15
1 9
1 8
1 13
0 26
1 5
1 18
0 19
0 24
1 20
0 31
0 15
0 20
0 2
1 23
0 18
0 19
0 6
1 25
0 16
1 24
1 16
1 27
1 28
1 1
1 19
1 22
0 25
0 2
0 28
0 29
0 30
1 32
1 33
1 29
1 21
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 28
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

points 1.0 p = 1.00, C = 0, E = 2

Test #279:

score: 74
Accepted
time: 33ms
memory: 9016kb

input:

4
100000
0 8
0 17
0 8
1 1
0 32
1 4
0 13
1 3
0 22
1 2
0 20
1 7
0 20
1 5
0 25
0 5
0 18
0 6
0 31
1 9
0 21
1 11
0 4
0 2
0 4
1 16
1 14
0 29
0 11
0 28
0 27
1 18
0 19
1 22
1 19
0 16
1 23
1 20
1 12
1 17
1 10
1 13
0 13
0 18
1 21
0 7
0 16
1 26
0 9
1 28
0 29
1 29
0 30
0 29
1 30
0 14
0 24
0 11
1 34
1 27
1 32
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 8
0 -1
1 8
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

points 1.0 p = 1.00, C = 0, E = 2

Test #280:

score: 74
Accepted
time: 29ms
memory: 8840kb

input:

4
100000
0 9
0 12
0 4
1 3
0 1
0 14
1 4
0 2
0 8
1 2
0 14
0 9
0 5
1 9
0 11
0 8
0 15
0 2
0 8
0 14
0 14
0 9
0 13
1 14
1 7
1 6
1 13
0 6
0 9
1 20
1 5
0 7
0 8
0 7
1 19
0 12
1 12
0 3
0 3
0 2
1 28
0 12
1 17
1 21
0 15
1 18
0 15
1 31
1 27
1 1
0 6
0 8
1 33
0 14
1 34
1 30
1 22
0 9
1 16
1 11
1 10
0 7
0 6
0 7
1 38...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 9
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

points 1.0 p = 1.00, C = 0, E = 2

Test #281:

score: 74
Accepted
time: 35ms
memory: 8792kb

input:

4
100000
0 3
0 1
0 1
1 3
0 1
0 2
1 4
1 5
0 2
0 2
0 4
1 8
0 1
0 1
1 7
1 10
0 1
0 4
1 11
0 2
1 12
1 6
0 1
0 4
1 15
0 3
1 16
0 1
0 2
0 2
0 2
0 1
1 19
1 17
0 2
1 22
0 1
0 2
0 4
1 23
1 14
1 25
0 3
1 26
0 1
1 27
0 3
0 3
0 1
1 28
1 29
1 30
1 2
0 3
1 31
1 18
0 2
0 4
0 3
0 3
0 1
0 2
1 37
1 35
1 34
0 3
1 38
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 3
0 -1
1 1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
1 1
0 -1
1 1
1 1
1 1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

points 1.0 p = 1.00, C = 0, E = 2

Test #282:

score: 74
Accepted
time: 31ms
memory: 8880kb

input:

4
100000
0 3
0 2
0 1
1 3
0 1
1 1
0 2
1 2
0 3
0 3
1 4
1 6
0 2
0 1
1 9
0 1
0 4
1 11
0 4
0 3
0 4
1 14
1 12
0 1
1 8
0 2
0 1
1 17
1 16
1 13
1 5
0 3
1 18
1 7
0 3
1 19
0 3
0 3
1 20
1 15
0 3
1 22
0 2
1 23
0 1
1 24
0 4
0 3
1 26
0 4
0 4
1 27
1 25
1 28
0 1
1 29
0 3
0 2
1 31
0 2
1 30
0 3
0 3
0 2
1 35
1 33
0 1
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
1 3
0 -1
1 2
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
1 1
1 1
1 1
1 1
1 1
0 -1
1 1
0 -1
1 3
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
...

result:

points 1.0 p = 1.00, C = 0, E = 2

Test #283:

score: 74
Accepted
time: 30ms
memory: 9032kb

input:

4
100000
0 3
0 3
0 1
1 2
0 10
1 1
0 6
0 8
0 7
0 12
0 14
0 4
0 12
0 12
1 10
0 2
1 13
0 6
0 13
1 9
0 1
1 7
1 11
0 3
1 14
0 13
1 18
0 4
0 15
1 20
1 19
1 5
0 9
0 12
0 11
0 7
1 23
0 14
1 25
0 10
1 21
1 17
1 15
0 14
0 10
1 27
1 28
1 24
0 11
1 29
1 4
0 8
1 30
1 26
0 13
1 31
0 12
0 12
0 3
1 33
1 32
1 34
0 7...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 3
1 3
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1...

result:

points 1.0 p = 1.00, C = 0, E = 2

Test #284:

score: 74
Accepted
time: 29ms
memory: 8936kb

input:

4
100000
0 13
0 2
0 15
1 3
0 5
0 10
0 13
1 5
1 4
1 6
0 10
1 7
0 15
0 15
1 8
1 9
0 4
1 10
0 14
1 11
0 5
0 12
0 3
0 10
1 12
1 13
1 2
0 11
0 7
0 8
1 16
1 17
1 18
1 15
0 9
1 19
0 14
1 20
0 14
0 3
0 12
0 1
1 21
1 23
0 9
0 7
1 25
0 11
1 27
0 2
0 6
1 29
0 10
0 14
0 9
0 8
0 13
0 15
0 13
1 34
0 1
0 12
1 35
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 13
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 13
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

points 1.0 p = 1.00, C = 0, E = 2