QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#132668#5206. Hot and ColdSwarthmore#AC ✓4ms3592kbC++205.0kb2023-07-31 00:39:102023-07-31 00:39:12

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-07-31 00:39:12]
  • 评测
  • 测评结果:AC
  • 用时:4ms
  • 内存:3592kb
  • [2023-07-31 00:39:10]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
using ll = long long;

// Template {{{
#define REP(n) for (int _=0; _<(n); _++)
#define FOR(i, a, b) for (int i=a; i<(b); i++)
#define F0R(i, a) for (int i=0; i<(a); i++)
#define FORd(i,a,b) for (int i = (b)-1; i >= a; i--)
#define F0Rd(i,a) for (int i = (a)-1; i >= 0; i--)
 
#define sz(x) (int)(x).size()
#define all(x) x.begin(), x.end()
 
template<class T> bool ckmin(T& a, const T& b) { return b < a ? a = b, 1 : 0; }
template<class T> bool ckmax(T& a, const T& b) { return a < b ? a = b, 1 : 0; }

namespace std {
  template<class Fun>
  class y_combinator_result {
    Fun fun_;
  public:
    template<class T>
    explicit y_combinator_result(T &&fun): fun_(std::forward<T>(fun)) {}
   
    template<class ...Args>
    decltype(auto) operator()(Args &&...args) {
      return fun_(std::ref(*this), std::forward<Args>(args)...);
    }
  };
   
  template<class Fun>
  decltype(auto) y_combinator(Fun &&fun) {
    return y_combinator_result<std::decay_t<Fun>>(std::forward<Fun>(fun));
  }
} // namespace std

#define DEBUG(x) cerr << #x << ": " << x << '\n'
template<typename A, typename B> 
ostream& operator<<(ostream &os, const pair<A, B> &p) { 
  return os << '(' << p.first << ", " << p.second << ')'; 
}
template<typename T_container, 
  typename T = typename enable_if<!is_same<T_container, string>::value, 
  typename T_container::value_type>::type> 
ostream& operator<<(ostream &os, const T_container &v) { 
  os << '['; string sep; 
  for (const T &x : v) 
    os << sep << x, sep = ", "; 
  return os << ']'; 
}
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
// }}}


int X, Y;
int cx = -1, cy = -1;
string found, closer, further, same, notfound;
int Q = 0;

const int MX = 1000000;
string CLOSER, FURTHER;
string query(int x, int y) {
  Q++; assert(Q <= 64);
  cout << x << ' ' << y << endl;
  string s;
  getline(cin, s);
  // string s;
  // if (cx == -1 && cy == -1) {
  //   s = notfound;
  // }
  // else if (x == X && y == Y) {
  //   s = found;
  // }
  // else {
  //   ll d1 = 1LL * (cx - X) * (cx - X) + 1LL * (cy - Y) * (cy - Y);
  //   ll d2 = 1LL * (x - X) * (x - X) + 1LL * (y - Y) * (y - Y);
  //   cout << "d1: " << cx << ' ' << cy << ": " << d1 << endl;
  //   cout << "d2: " << x << ' ' << y << ": " << d2 << endl;
  //   if (d2 < d1) s = closer;
  //   else if (d2 > d1) s = further;
  //   else s = same;
  // }
  // cx = x, cy = y;

  if (s.back() == '!') {
    exit(0);
  }
  return s;
}

void bsearch(int xmin, int xmax, int ymin, int ymax) {
  assert(CLOSER.size() && FURTHER.size());
  if (xmin == xmax && ymin == ymax) {
    query(xmin, ymin);
    return;
  }

  int new_xmin = xmin;
  int new_xmax = xmax;
  int new_ymin = ymin;
  int new_ymax = ymax;

  if (xmin == xmax) {
    string D = query(xmax, ymax);
    if (D == CLOSER) {
      new_ymin = (ymin + ymax) / 2 + 1;
    }
    else if (D == FURTHER) {
      new_ymax = (ymin + ymax - 1) / 2;
    }
    else { // equal
      assert((ymin + ymax) % 2 == 0);
      int mid = (ymin + ymax) / 2;
      new_ymin = new_ymax = mid;
    }
  }
  else if (ymin == ymax) {
    string B = query(xmax, ymin);
    if (B == CLOSER) {
      new_xmin = (xmin + xmax) / 2 + 1;
    }
    else if (B == FURTHER) {
      new_xmax = (xmin + xmax - 1) / 2;
    }
    else { // equal
      assert((xmin + xmax) % 2 == 0);
      int mid = (xmin + xmax) / 2;
      new_xmin = new_xmax = mid;
    }
  }
  else {
    string B = query(xmax, ymin);
    if (B == CLOSER) {
      new_xmin = (xmin + xmax) / 2 + 1;
    }
    else if (B == FURTHER) {
      new_xmax = (xmin + xmax - 1) / 2;
    }
    else { // equal
      assert((xmin + xmax) % 2 == 0);
      int mid = (xmin + xmax) / 2;
      new_xmin = new_xmax = mid;
    }

    string D = query(xmax, ymax);
    if (D == CLOSER) {
      new_ymin = (ymin + ymax) / 2 + 1;
    }
    else if (D == FURTHER) {
      new_ymax = (ymin + ymax - 1) / 2;
    }
    else { // equal
      assert((ymin + ymax) % 2 == 0);
      int mid = (ymin + ymax) / 2;
      new_ymin = new_ymax = mid;
    }
  }
  query(new_xmin, new_ymin);
  bsearch(new_xmin, new_xmax, new_ymin, new_ymax);
}

int main() {
  ios_base::sync_with_stdio(false); cin.tie(NULL);
  // cin >> X >> Y;
  // cin >> found >> closer >> further >> same >> notfound;

  string not_found = query(1, 0);
  string x1 = query(0, 0);
  string y2 = query(0, 1);
  string y1 = query(0, 0);

  // cout << x1 << ' ' << y1 << ' ' << y2 << endl;

  if (x1 == y1) {
    FURTHER = x1;
    CLOSER = y2;
    bsearch(0, MX, 0, MX);
  }
  else {
    // on x or y-axis
    // check corners first
    // total: 8 + 40 queries
    query(0, MX);
    query(MX, 0);
    query(MX, MX);
    CLOSER = query(MX, MX-1);

    if (CLOSER == y2) {
      FURTHER = y1;
      query(0, 0);
      bsearch(0, 0, 1, MX-1);
    }
    else {
      assert(CLOSER == y1);
      FURTHER = y2;
      query(0, 0);
      bsearch(1, MX-1, 0, 0);
    }
  }
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 2ms
memory: 3556kb

input:

Tabilmadi
Dalej
Daha yakin
Dalej
Dalej
Dalej
Daha yakin
Dalej
Dalej
Daha yakin
Dalej
Dalej
Daha yakin
Dalej
Dalej
Daha yakin
Dalej
Dalej
Daha yakin
Dalej
Dalej
Daha yakin
Dalej
Dalej
Daha yakin
Dalej
Dalej
Daha yakin
Dalej
Dalej
Daha yakin
Dalej
Dalej
Daha yakin
Daha yakin
Dalej
Daha yakin
Dalej
Dal...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
0 0
499999 0
499999 499999
0 0
249999 0
249999 249999
0 0
124999 0
124999 124999
0 0
62499 0
62499 62499
0 0
31249 0
31249 31249
0 0
15624 0
15624 15624
0 0
7811 0
7811 7811
0 0
3905 0
3905 3905
0 0
1952 0
1952 1952
0 0
975 0
975 975
488 0
975 0
975 487
488 ...

result:

ok 60 points

Test #2:

score: 0
Accepted
time: 0ms
memory: 3520kb

input:

rr
ww
qq
ww
qq
qq
ww
qq
qq
qq
ww
ww
qq
ww
ww
qq
ww
ww
qq
qq
qq
ww
qq
qq
ww
qq
qq
qq
ww
ww
qq
ww
ww
qq
ww
ww
qq
qq
qq
ww
qq
qq
ww
qq
qq
qq
ww
ww
qq
ww
ww
qq
ww
ww
qq
qq
qq
ee
ee
ee
You are lucky today!

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
500001 500001
1000000 500001
1000000 1000000
750001 750001
1000000 750001
1000000 1000000
750001 750001
875000 750001
875000 875000
750001 750001
812500 750001
812500 812500
750001 750001
781250 750001
781250 781250
765626 765626
781250 765626
781250 781250
...

result:

ok 61 points

Test #3:

score: 0
Accepted
time: 3ms
memory: 3512kb

input:

Tabilmadi
Dalej
Daha yakin
Dalej
Dalej
Dalej
Daha yakin
Dalej
Dalej
Daha yakin
Dalej
Dalej
Daha yakin
Dalej
Dalej
Daha yakin
Dalej
Dalej
Daha yakin
Dalej
Dalej
Daha yakin
Dalej
Dalej
Daha yakin
Dalej
Dalej
Daha yakin
Dalej
Dalej
Daha yakin
Dalej
Dalej
Daha yakin
Dalej
Daha yakin
Daha yakin
Dalej
Dal...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
0 0
499999 0
499999 499999
0 0
249999 0
249999 249999
0 0
124999 0
124999 124999
0 0
62499 0
62499 62499
0 0
31249 0
31249 31249
0 0
15624 0
15624 15624
0 0
7811 0
7811 7811
0 0
3905 0
3905 3905
0 0
1952 0
1952 1952
0 0
975 0
975 975
0 488
487 488
487 975
0 ...

result:

ok 60 points

Test #4:

score: 0
Accepted
time: 0ms
memory: 3592kb

input:

voyne net
mir miru
miru mir
mir miru
miru mir
mir miru
miru mir
mir miru
mir miru
miru mir
mir miru
miru mir
miru mir
miru mir
miru mir
miru mir
mir miru
miru mir
miru mir
mir miru
miru mir
miru mir
mir miru
mir miru
miru mir
mir miru
miru mir
miru mir
miru mir
mir miru
miru mir
miru mir
miru mir
mi...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
500001 0
1000000 0
1000000 499999
500001 0
750000 0
750000 249999
500001 125000
625000 125000
625000 249999
562501 187500
625000 187500
625000 249999
562501 218750
593750 218750
593750 249999
562501 234375
578125 234375
578125 249999
562501 234375
570312 234...

result:

ok 58 points

Test #5:

score: 0
Accepted
time: 3ms
memory: 3472kb

input:

miru    mir
miru mir
miru  mir
miru mir
miru mir
miru  mir
miru  mir
miru mir
miru mir
miru  mir
miru  mir
miru mir
miru  mir
miru  mir
miru  mir
miru  mir
miru  mir
miru mir
miru  mir
miru  mir
miru mir
miru  mir
miru mir
miru mir
miru  mir
miru  mir
miru mir
miru  mir
miru mir
miru  mir
miru  mir
...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
0 500001
499999 500001
499999 1000000
0 500001
249999 500001
249999 750000
125000 500001
249999 500001
249999 625000
187500 562501
249999 562501
249999 625000
218750 562501
249999 562501
249999 593750
234375 562501
249999 562501
249999 578125
234375 562501
2...

result:

ok 58 points

Test #6:

score: 0
Accepted
time: 1ms
memory: 3432kb

input:

mmimRRmmmmuiiuuiuimRmiiuiuiiuu
mmimRRmmmmuiiuuiuimRmiiuiuiiui
mmimRRmmmmuiiuuiuimRmiiuiuiiuR
mmimRRmmmmuiiuuiuimRmiiuiuiiui
mmimRRmmmmuiiuuiuimRmiiuiuiiui
mmimRRmmmmuiiuuiuimRmiiuiuiiui
mmimRRmmmmuiiuuiuimRmiiuiuiiuR
mmimRRmmmmuiiuuiuimRmiiuiuiiuR
mmimRRmmmmuiiuuiuimRmiiuiuiiuR
mmimRRmmmmuiiuuiuimRm...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
0 0
499999 0
499999 499999
250000 250000
499999 250000
499999 499999
250000 250000
374999 250000
374999 374999
312500 312500
374999 312500
374999 374999
312500 312500
343749 312500
343749 343749
328125 328125
343749 328125
343749 343749
328125 328125
335936 ...

result:

ok 61 points

Test #7:

score: 0
Accepted
time: 0ms
memory: 3520kb

input:

uiuumRmiRuRuRmmimuuummiRuiRumR
uiuumRmiRuRuRmmimuuummiRuiRumu
uiuumRmiRuRuRmmimuuummiRuiRumi
uiuumRmiRuRuRmmimuuummiRuiRumu
uiuumRmiRuRuRmmimuuummiRuiRumi
uiuumRmiRuRuRmmimuuummiRuiRumi
uiuumRmiRuRuRmmimuuummiRuiRumi
uiuumRmiRuRuRmmimuuummiRuiRumu
uiuumRmiRuRuRmmimuuummiRuiRumu
uiuumRmiRuRuRmmimuuum...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
500001 500001
1000000 500001
1000000 1000000
500001 500001
750000 500001
750000 750000
625001 625001
750000 625001
750000 750000
625001 625001
687500 625001
687500 687500
656251 656251
687500 656251
687500 687500
656251 656251
671875 656251
671875 671875
664...

result:

ok 61 points

Test #8:

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

input:

RiRiiiimiRiiiuRuuRiRmuRiuRuRRm
RiRiiiimiRiiiuRuuRiRmuRiuRuRR!

output:

1 0
0 0

result:

ok 2 points

Test #9:

score: 0
Accepted
time: 0ms
memory: 3472kb

input:

imRRmiRiRiRuimuiRiiiumiiRRmRim
mRmmmRmRRmiiuiummmuiiiuiRiRRmu
RuRummmRRimumRimuRRiRuRuuiuRui
mRmmmRmRRmiiuiummmuiiiuiRiRRmu
RuRummmRRimumRimuRRiRuRuuiuRui
iimumuiuRiiiiRmRmimuiRmiRRiRm!

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000

result:

ok 6 points

Test #10:

score: 0
Accepted
time: 1ms
memory: 3560kb

input:

RiuimmRRRmmiimmiRuRRRmRiuimRum
RiuimmRRRmmiimmiRuRRRmRiuimRuR
RiuimmRRRmmiimmiRuRRRmRiuimRuR
RiuimmRRRmmiimmiRuRRRmRiuimRuu
RiuimmRRRmmiimmiRuRRRmRiuimRu!

output:

1 0
0 0
0 1
0 0
0 1000000

result:

ok 5 points

Test #11:

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

input:

muumRumummuRiiiRuRmmmimumuimmm
RuuimuiiuRmiRRummuiiuuiiiiRiuR
RuuimuiiuRmiRRummuiiuuiiiiRiuR
RuuRimimuimRRRmuuiRiiumuRRiiui
RuuimuiiuRmiRRummuiiuuiiiiRiuR
iuiuuRmmiRiuuiimmmiiRiRRuiuiR!

output:

1 0
0 0
0 1
0 0
0 1000000
1000000 0

result:

ok 6 points

Test #12:

score: 0
Accepted
time: 1ms
memory: 3528kb

input:

iiRmmuRiummRimiuiRRmmmimRummii
mRuRuuRRiuiiiRiummuumRRRiRRmRu
RmRumumumimiRmuimRRmuumiRRRiRR
mRuRuuRRiuiiiRiummuumRRRiRRmRu
mRuRuuRRiuiiiRiummuumRRRiRRmRu
mRuRuuRRiuiiiRiummuumRRRiRRmRu
RmRumumumimiRmuimRRmuumiRRRiRR
RmRumumumimiRmuimRRmuumiRRRiRR
RmRumumumimiRmuimRRmuumiRRRiRR
RmRumumumimiRmuimRRmu...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
0 0
499999 0
499999 499999
250000 250000
499999 250000
499999 499999
250000 250000
374999 250000
374999 374999
312500 312500
374999 312500
374999 374999
312500 312500
343749 312500
343749 343749
328125 328125
343749 328125
343749 343749
328125 328125
335936 ...

result:

ok 61 points

Test #13:

score: 0
Accepted
time: 0ms
memory: 3540kb

input:

RimiuiiuuimmRiimimuiiuuuiiimmR
miiuuimuiiimuuiimuiRRuimRRRRRm
iRiuuRumumumiiRRumRmiRRiuumiii
miiuuimuiiimuuiimuiRRuimRRRRRm
iRiuuRumumumiiRRumRmiRRiuumiii
iRiuuRumumumiiRRumRmiRRiuumiii
iRiuuRumumumiiRRumRmiRRiuumiii
miiuuimuiiimuuiimuiRRuimRRRRRm
miiuuimuiiimuuiimuiRRuimRRRRRm
iRiuuRumumumiiRRumRmi...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
500001 500001
1000000 500001
1000000 1000000
500001 500001
750000 500001
750000 750000
625001 625001
750000 625001
750000 750000
625001 625001
687500 625001
687500 687500
656251 656251
687500 656251
687500 687500
656251 656251
671875 656251
671875 671875
664...

result:

ok 61 points

Test #14:

score: 0
Accepted
time: 1ms
memory: 3516kb

input:

mimimRRuRRRmummimRuiiuRRiiRiuu
mRummmRRuRRumiuiuiiuummmRmRRui
RuuiuRuiuRmiRumRRmummiuiiiiiu!

output:

1 0
0 0
0 1

result:

ok 3 points

Test #15:

score: 0
Accepted
time: 3ms
memory: 3524kb

input:

miRuRiuumuuimuRRiRimmmRRimmuui
iRRRuRuiimRRuuiuRumiuiiumRuRiR
RRuiuiiuiummRuuuuiRmRRmuuimuim
iRRRuRuiimRRuuiuRumiuiiumRuRiR
RRuiuiiuiummRuuuuiRmRRmuuimuim
RRuiuiiuiummRuuuuiRmRRmuuimuim
iRRRuRuiimRRuuiuRumiuiiumRuRiR
RRuiuiiuiummRuuuuiRmRRmuuimuim
RRuiuiiuiummRuuuuiRmRRmuuimuim
iRRRuRuiimRRuuiuRumiu...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
500001 500001
1000000 500001
1000000 1000000
750001 750001
1000000 750001
1000000 1000000
875001 875001
1000000 875001
1000000 1000000
937501 937501
1000000 937501
1000000 1000000
968751 968751
1000000 968751
1000000 1000000
984376 984376
1000000 984376
1000...

result:

ok 61 points

Test #16:

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

input:

RRuuiiiiiiRummuRuumRmuiiiiuuui
iRmRiiuiuRiumummumummuiumuuRRR
iRmRiiuiuRiumummumummuiumuuRRR
uRimmuumRmumRiuuRuiiRuuRimRRRm
iRmRiiuiuRiumummumummuiumuuRRR
uRimmuumRmumRiuuRuiiRuuRimRRRm
iRmRiiuiuRiumummumummuiumuuRRR
iRmRiiuiuRiumummumummuiumuuRRR
iRmRiiuiuRiumummumummuiumuuRRR
RiiRuiuuimiimummRumRm...

output:

1 0
0 0
0 1
0 0
0 1000000
1000000 0
1000000 1000000
1000000 999999
0 0
0 999999

result:

ok 10 points

Test #17:

score: 0
Accepted
time: 0ms
memory: 3520kb

input:

mRRuumRRmuRumRmimiimmiRiuiiRRm
mRRuumRRmuRumRmimiimmiRiuiiRRu
mRRuumRRmuRumRmimiimmiRiuiiRRR
mRRuumRRmuRumRmimiimmiRiuiiRRu
mRRuumRRmuRumRmimiimmiRiuiiRRR
mRRuumRRmuRumRmimiimmiRiuiiRRu
mRRuumRRmuRumRmimiimmiRiuiiRRR
mRRuumRRmuRumRmimiimmiRiuiiRRR
mRRuumRRmuRumRmimiimmiRiuiiRRu
mRRuumRRmuRumRmimiimm...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
500001 0
1000000 0
1000000 499999
750001 0
1000000 0
1000000 249999
875001 0
1000000 0
1000000 124999
937501 0
1000000 0
1000000 62499
968751 0
1000000 0
1000000 31249
984376 0
1000000 0
1000000 15624
992189 0
1000000 0
1000000 7811
996095 0
1000000 0
100000...

result:

ok 61 points

Test #18:

score: 0
Accepted
time: 3ms
memory: 3592kb

input:

miiuRimumuumRiRiuRiiiRuRRumiRu
miiuRimumuumRiRiuRiiiRuRRumiRi
miiuRimumuumRiRiuRiiiRuRRumiRm
miiuRimumuumRiRiuRiiiRuRRumiRi
miiuRimumuumRiRiuRiiiRuRRumiRi
miiuRimumuumRiRiuRiiiRuRRumiRi
miiuRimumuumRiRiuRiiiRuRRumiRm
miiuRimumuumRiRiuRiiiRuRRumiRm
miiuRimumuumRiRiuRiiiRuRRumiRm
miiuRimumuumRiRiuRiii...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
0 0
499999 0
499999 499999
250000 250000
499999 250000
499999 499999
250000 250000
374999 250000
374999 374999
312500 312500
374999 312500
374999 374999
312500 312500
343749 312500
343749 343749
328125 328125
343749 328125
343749 343749
328125 328125
335936 ...

result:

ok 59 points

Test #19:

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

input:

iummmimiimRimumiRuimRimRRiRmuR
iummmimiimRimumiRuimRimRRiRmum
iummmimiimRimumiRuimRimRRiRmuu
iummmimiimRimumiRuimRimRRiRmum
iummmimiimRimumiRuimRimRRiRmuu
iummmimiimRimumiRuimRimRRiRmuu
iummmimiimRimumiRuimRimRRiRmuu
iummmimiimRimumiRuimRimRRiRmum
iummmimiimRimumiRuimRimRRiRmum
iummmimiimRimumiRuimR...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
500001 500001
1000000 500001
1000000 1000000
500001 500001
750000 500001
750000 750000
625001 625001
750000 625001
750000 750000
625001 625001
687500 625001
687500 687500
656251 656251
687500 656251
687500 687500
656251 656251
671875 656251
671875 671875
664...

result:

ok 60 points

Test #20:

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

input:

uRimimimiRumimRiRmuRiuummRiiRm
uRimimimiRumimRiRmuRiuummRiiRi
uRimimimiRumimRiRmuRiuummRiiRi
uRimimimiRumimRiRmuRiuummRiiRR
uRimimimiRumimRiRmuRiuummRiiRR
uRimimimiRumimRiRmuRiuummRiiRR
uRimimimiRumimRiRmuRiuummRiiRR
uRimimimiRumimRiRmuRiuummRiiRi
uRimimimiRumimRiRmuRiuummRiiRi
uRimimimiRumimRiRmuRi...

output:

1 0
0 0
0 1
0 0
0 1000000
1000000 0
1000000 1000000
1000000 999999
0 0
0 999999
0 1
0 499999
0 1
0 249999
0 1
0 124999
0 1
0 62499
0 1
0 31249
0 1
0 15624
0 1
0 7812
0 1
0 3906
0 1
0 1953
0 1
0 976
0 1
0 488
0 1
0 244
0 1
0 122
0 1
0 61
0 1
0 30
0 1
0 15
0 1
0 7
0 1
0 3
0 2

result:

ok 47 points

Test #21:

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

input:

iumiimiRuimmuiRmuuuRiiRRmRiium
iumiimiRuimmuiRmuuuRiiRRmRiiui
iumiimiRuimmuiRmuuuRiiRRmRiiuR
iumiimiRuimmuiRmuuuRiiRRmRiiui
iumiimiRuimmuiRmuuuRiiRRmRiiuR
iumiimiRuimmuiRmuuuRiiRRmRiiuR
iumiimiRuimmuiRmuuuRiiRRmRiiui
iumiimiRuimmuiRmuuuRiiRRmRiiuR
iumiimiRuimmuiRmuuuRiiRRmRiiuR
iumiimiRuimmuiRmuuuRi...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
500001 500001
1000000 500001
1000000 1000000
750001 750001
1000000 750001
1000000 1000000
875001 875001
1000000 875001
1000000 1000000
937501 937501
1000000 937501
1000000 1000000
968751 968751
1000000 968751
1000000 1000000
984376 984376
1000000 984376
1000...

result:

ok 59 points

Test #22:

score: 0
Accepted
time: 1ms
memory: 3584kb

input:

mmiuiimumiRiRuRuRmiRimRmuiimmu
mmiuiimumiRiRuRuRmiRimRmuiimmi
mmiuiimumiRiRuRuRmiRimRmuiimmi
mmiuiimumiRiRuRuRmiRimRmuiimmR
mmiuiimumiRiRuRuRmiRimRmuiimmi
mmiuiimumiRiRuRuRmiRimRmuiimmR
mmiuiimumiRiRuRuRmiRimRmuiimmi
mmiuiimumiRiRuRuRmiRimRmuiimmi
mmiuiimumiRiRuRuRmiRimRmuiimmi
mmiuiimumiRiRuRuRmiRi...

output:

1 0
0 0
0 1
0 0
0 1000000
1000000 0
1000000 1000000
1000000 999999
0 0
0 999999
0 500001
0 999999
0 750001
0 999999
0 875001
0 999999
0 937501
0 999999
0 968751
0 999999
0 984376
0 999999
0 992188
0 999999
0 996094
0 999999
0 998047
0 999999
0 999024
0 999999
0 999512
0 999999
0 999756
0 999999
0 99...

result:

ok 47 points

Test #23:

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

input:

umuuuiRmuRiummRRumimRRiimmiiim
RuumRiiuumRmumRRuRiRmRiiimRiiu
mRuiummRuRimmmRmmmuiiuuiuRimRR
RuumRiiuumRmumRRuRiRmRiiimRiiu
mRuiummRuRimmmRmmmuiiuuiuRimRR
RuumRiiuumRmumRRuRiRmRiiimRiiu
mRuiummRuRimmmRmmmuiiuuiuRimRR
mRuiummRuRimmmRmmmuiiuuiuRimRR
RuumRiiuumRmumRRuRiRmRiiimRiiu
mRuiummRuRimmmRmmmuii...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
500001 0
1000000 0
1000000 499999
750001 0
1000000 0
1000000 249999
875001 0
1000000 0
1000000 124999
937501 0
1000000 0
1000000 62499
968751 0
1000000 0
1000000 31249
984376 0
1000000 0
1000000 15624
992189 0
1000000 0
1000000 7811
996095 0
1000000 0
100000...

result:

ok 60 points

Test #24:

score: 0
Accepted
time: 1ms
memory: 3556kb

input:

immRuRRmmRuRiimRimiuuumuRiRmum
mRimuiuimmRRmmiuRmRimuuuumimRi
uRmumuimRRmiuRuuumRmmuRRmiiRiR
mRimuiuimmRRmmiuRmRimuuuumimRi
mRimuiuimmRRmmiuRmRimuuuumimRi
mRimuiuimmRRmmiuRmRimuuuumimRi
uRmumuimRRmiuRuuumRmmuRRmiiRiR
uRmumuimRRmiuRuuumRmmuRRmiiRiR
uRmumuimRRmiuRuuumRmmuRRmiiRiR
uRmumuimRRmiuRuuumRmm...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
0 0
499999 0
499999 499999
250000 250000
499999 250000
499999 499999
250000 250000
374999 250000
374999 374999
312500 312500
374999 312500
374999 374999
312500 312500
343749 312500
343749 343749
328125 328125
343749 328125
343749 343749
328125 328125
335936 ...

result:

ok 61 points

Test #25:

score: 0
Accepted
time: 3ms
memory: 3572kb

input:

iuRRmRRmRuuuumuuuuumuRuimuRiui
umRuRiRmiiuuuuRuRumRmuiuRiRiRR
mumumRimiumuRumumRiimRummiiiim
umRuRiRmiiuuuuRuRumRmuiuRiRiRR
mumumRimiumuRumumRiimRummiiiim
mumumRimiumuRumumRiimRummiiiim
mumumRimiumuRumumRiimRummiiiim
umRuRiRmiiuuuuRuRumRmuiuRiRiRR
umRuRiRmiiuuuuRuRumRmuiuRiRiRR
mumumRimiumuRumumRiim...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
500001 500001
1000000 500001
1000000 1000000
500001 500001
750000 500001
750000 750000
625001 625001
750000 625001
750000 750000
625001 625001
687500 625001
687500 687500
656251 656251
687500 656251
687500 687500
656251 656251
671875 656251
671875 671875
664...

result:

ok 61 points

Test #26:

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

input:

immRRmRuuRmRiRRmmuRiiuimiiumRu
iuimuRRRmRiRiRimuiimmmuRmiuuRi
iuimuRRRmRiRiRimuiimmmuRmiuuRi
uiRRuRiiumuimiiuiumRimRmmRRmim
uiRRuRiiumuimiiuiumRimRmmRRmim
uiRRuRiiumuimiiuiumRimRmmRRmim
uiRRuRiiumuimiiuiumRimRmmRRmim
iuimuRRRmRiRiRimuiimmmuRmiuuRi
iuimuRRRmRiRiRimuiimmmuRmiuuRi
uiRRuRiiumuimiiuiumRi...

output:

1 0
0 0
0 1
0 0
0 1000000
1000000 0
1000000 1000000
1000000 999999
0 0
0 999999
0 1
0 499999
0 1
0 249999
0 1
0 124999
0 1
0 62499
0 1
0 31249
0 1
0 15624
0 1
0 7812
0 1
0 3906
0 1
0 1953
0 1
0 976
0 1
0 488
0 1
0 244
0 1
0 122
0 1
0 61
0 1
0 30
0 1
0 15
0 1
0 7
0 1
0 3

result:

ok 46 points

Test #27:

score: 0
Accepted
time: 3ms
memory: 3560kb

input:

mmiRRRRmRmuummmmumRmiiimuRmuRi
mmiRRRRmRmuummmmumRmiiimuRmuRm
mmiRRRRmRmuummmmumRmiiimuRmuRR
mmiRRRRmRmuummmmumRmiiimuRmuRm
mmiRRRRmRmuummmmumRmiiimuRmuRR
mmiRRRRmRmuummmmumRmiiimuRmuRR
mmiRRRRmRmuummmmumRmiiimuRmuRm
mmiRRRRmRmuummmmumRmiiimuRmuRR
mmiRRRRmRmuummmmumRmiiimuRmuRR
mmiRRRRmRmuummmmumRmi...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
500001 500001
1000000 500001
1000000 1000000
750001 750001
1000000 750001
1000000 1000000
875001 875001
1000000 875001
1000000 1000000
937501 937501
1000000 937501
1000000 1000000
968751 968751
1000000 968751
1000000 1000000
984376 984376
1000000 984376
1000...

result:

ok 59 points

Test #28:

score: 0
Accepted
time: 3ms
memory: 3560kb

input:

uRiiRiRmmiuRmRiRmRiuiRiRuumium
iuimiiRuimuRuumRRmmiuiimmRmiRi
iuimiiRuimuRuumRRmmiuiimmRmiRi
imimumRmiRmiuuiimmRRuiRuimRmRR
iuimiiRuimuRuumRRmmiuiimmRmiRi
imimumRmiRmiuuiimmRRuiRuimRmRR
iuimiiRuimuRuumRRmmiuiimmRmiRi
iuimiiRuimuRuumRRmmiuiimmRmiRi
iuimiiRuimuRuumRRmmiuiimmRmiRi
iuimiiRuimuRuumRRmmiu...

output:

1 0
0 0
0 1
0 0
0 1000000
1000000 0
1000000 1000000
1000000 999999
0 0
0 999999
0 500001
0 999999
0 750001
0 999999
0 875001
0 999999
0 937501
0 999999
0 968751
0 999999
0 984376
0 999999
0 992188
0 999999
0 996094
0 999999
0 998047
0 999999
0 999024
0 999999
0 999512
0 999999
0 999756
0 999999
0 99...

result:

ok 45 points

Test #29:

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

input:

imRuuRRimiuuRiRuiiRummimuiRuuR
iRmuuuiuuiimRiimRumiiimmimuuii
RmRimiuRRiRRiiuiRiiuiRRRiiummm
iRmuuuiuuiimRiimRumiiimmimuuii
RmRimiuRRiRRiiuiRiiuiRRRiiummm
iRmuuuiuuiimRiimRumiiimmimuuii
RmRimiuRRiRRiiuiRiiuiRRRiiummm
RmRimiuRRiRRiiuiRiiuiRRRiiummm
iRmuuuiuuiimRiimRumiiimmimuuii
RmRimiuRRiRRiiuiRiiui...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
500001 0
1000000 0
1000000 499999
750001 0
1000000 0
1000000 249999
875001 0
1000000 0
1000000 124999
937501 0
1000000 0
1000000 62499
968751 0
1000000 0
1000000 31249
984376 0
1000000 0
1000000 15624
992189 0
1000000 0
1000000 7811
996095 0
1000000 0
100000...

result:

ok 59 points

Test #30:

score: 0
Accepted
time: 0ms
memory: 3540kb

input:

uuRmRRuimummRmRmuiiumRiRiiiRuu
imimuimiuRumiRRRRiRmuiRumuuimR
iuiRmmuuumimiuuiiRimiRmmummRum
imimuimiuRumiRRRRiRmuiRumuuimR
imimuimiuRumiRRRRiRmuiRumuuimR
imimuimiuRumiRRRRiRmuiRumuuimR
iuiRmmuuumimiuuiiRimiRmmummRum
iuiRmmuuumimiuuiiRimiRmmummRum
iuiRmmuuumimiuuiiRimiRmmummRum
iuiRmmuuumimiuuiiRimi...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
0 0
499999 0
499999 499999
250000 250000
499999 250000
499999 499999
250000 250000
374999 250000
374999 374999
312500 312500
374999 312500
374999 374999
312500 312500
343749 312500
343749 343749
328125 328125
343749 328125
343749 343749
328125 328125
335936 ...

result:

ok 61 points

Test #31:

score: 0
Accepted
time: 3ms
memory: 3524kb

input:

uRmmiiiuRiuuRiRiiRmuRmuRRimuRm
uRmmiiiuRiuuRiRiiRmuRmuRRimuRi
uRmmiiiuRiuuRiRiiRmuRmuRRimuRR
uRmmiiiuRiuuRiRiiRmuRmuRRimuRi
uRmmiiiuRiuuRiRiiRmuRmuRRimuRR
uRmmiiiuRiuuRiRiiRmuRmuRRimuRR
uRmmiiiuRiuuRiRiiRmuRmuRRimuRR
uRmmiiiuRiuuRiRiiRmuRmuRRimuRi
uRmmiiiuRiuuRiRiiRmuRmuRRimuRi
uRmmiiiuRiuuRiRiiRmuR...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
500001 500001
1000000 500001
1000000 1000000
500001 500001
750000 500001
750000 750000
625001 625001
750000 625001
750000 750000
625001 625001
687500 625001
687500 687500
656251 656251
687500 656251
687500 687500
656251 656251
671875 656251
671875 671875
664...

result:

ok 61 points

Test #32:

score: 0
Accepted
time: 0ms
memory: 3532kb

input:

iRimiRmmiiumiiimRmRmRimumimRu!

output:

1 0

result:

ok 1 points

Test #33:

score: 0
Accepted
time: 4ms
memory: 3524kb

input:

uiRRmumuRimiRRRmmiiRRiimRRmiRR
iiumuiimmRuRmRimumuimRuRuuRuum
imRuimiumRmimimmuiRiiRiRiRuuii
iiumuiimmRuRmRimumuimRuRuuRuum
imRuimiumRmimimmuiRiiRiRiRuuii
imRuimiumRmimimmuiRiiRiRiRuuii
iiumuiimmRuRmRimumuimRuRuuRuum
imRuimiumRmimimmuiRiiRiRiRuuii
imRuimiumRmimimmuiRiiRiRiRuuii
iiumuiimmRuRmRimumuim...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
500001 500001
1000000 500001
1000000 1000000
750001 750001
1000000 750001
1000000 1000000
875001 875001
1000000 875001
1000000 1000000
937501 937501
1000000 937501
1000000 1000000
968751 968751
1000000 968751
1000000 1000000
984376 984376
1000000 984376
1000...

result:

ok 61 points

Test #34:

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

input:

RimuuRuuiiuRRmuiRRuiRmRmiuiumR
mRiRumRmmmRRmmuiummRiRimuiRuui
iuRmummRiuRRRRiiummiRmimRiiRmm
mRiRumRmmmRRmmuiummRiRimuiRuui
mRiRumRmmmRRmmuiummRiRimuiRuui
iuRmummRiuRRRRiiummiRmimRiiRmm
iuRmummRiuRRRRiiummiRmimRiiRmm
mRiRumRmmmRRmmuiummRiRimuiRuui
iuRmummRiuRRRRiiummiRmimRiiRmm
iuRmummRiuRRRRiiummiR...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
0 500001
499999 500001
499999 1000000
0 750001
249999 750001
249999 1000000
0 875001
124999 875001
124999 1000000
0 937501
62499 937501
62499 1000000
0 968751
31249 968751
31249 1000000
0 984376
15624 984376
15624 1000000
0 992189
7811 992189
7811 1000000
0 ...

result:

ok 61 points

Test #35:

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

input:

muRmmummiuiRRRmmmRRimmiimuuiRR
uuiRmRRRmmiimRuuuRmimmmiRumumu
uuiRmRRRmmiimRuuuRmimmmiRumumu
miiRumuuRiuRiiuRRRmuRmuRRRRRmm
uuiRmRRRmmiimRuuuRmimmmiRumumu
miiRumuuRiuRiiuRRRmuRmuRRRRRmm
uuiRmRRRmmiimRuuuRmimmmiRumumu
miiRumuuRiuRiiuRRRmuRmuRRRRRmm
miiRumuuRiuRiiuRRRmuRmuRRRRRmm
immiimiiRmumiummuuiuR...

output:

1 0
0 0
0 1
0 0
0 1000000
1000000 0
1000000 1000000
1000000 999999
0 0
999999 0

result:

ok 10 points

Test #36:

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

input:

mmmimRRuuiiuimRRmmiiummmuumRRR
mmmimRRuuiiuimRRmmiiummmuumRRm
mmmimRRuuiiuimRRmmiiummmuumRRu
mmmimRRuuiiuimRRmmiiummmuumRRm
mmmimRRuuiiuimRRmmiiummmuumRRm
mmmimRRuuiiuimRRmmiiummmuumRRm
mmmimRRuuiiuimRRmmiiummmuumRRu
mmmimRRuuiiuimRRmmiiummmuumRRu
mmmimRRuuiiuimRRmmiiummmuumRRu
mmmimRRuuiiuimRRmmiiu...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
0 0
499999 0
499999 499999
250000 250000
499999 250000
499999 499999
250000 250000
374999 250000
374999 374999
312500 312500
374999 312500
374999 374999
312500 312500
343749 312500
343749 343749
328125 328125
343749 328125
343749 343749
328125 328125
335936 ...

result:

ok 57 points

Test #37:

score: 0
Accepted
time: 3ms
memory: 3520kb

input:

RuRumuuiRRmmiRmiRiumRmuRiiimmR
RuRumuuiRRmmiRmiRiumRmuRiiimmu
RuRumuuiRRmmiRmiRiumRmuRiiimmm
RuRumuuiRRmmiRmiRiumRmuRiiimmu
RuRumuuiRRmmiRmiRiumRmuRiiimmm
RuRumuuiRRmmiRmiRiumRmuRiiimmm
RuRumuuiRRmmiRmiRiumRmuRiiimmm
RuRumuuiRRmmiRmiRiumRmuRiiimmu
RuRumuuiRRmmiRmiRiumRmuRiiimmu
RuRumuuiRRmmiRmiRiumR...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
500001 500001
1000000 500001
1000000 1000000
500001 500001
750000 500001
750000 750000
625001 625001
750000 625001
750000 750000
625001 625001
687500 625001
687500 687500
656251 656251
687500 656251
687500 687500
656251 656251
671875 656251
671875 671875
664...

result:

ok 60 points

Test #38:

score: 0
Accepted
time: 4ms
memory: 3524kb

input:

miiRRuuRmmiimuuimiRiRmmummRRim
RiiiRmmimummmuRuuRuuimRmmmiiiu
RiummRiRRRiimuRiRRmRmRuuiiuRiR
RiiiRmmimummmuRuuRuuimRmmmiiiu
RiiiRmmimummmuRuuRuuimRmmmiiiu
RiiiRmmimummmuRuuRuuimRmmmiiiu
RiummRiRRRiimuRiRRmRmRuuiiuRiR
RiiiRmmimummmuRuuRuuimRmmmiiiu
RiiiRmmimummmuRuuRuuimRmmmiiiu
RiummRiRRRiimuRiRRmRm...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
0 0
499999 0
499999 499999
0 0
249999 0
249999 249999
0 0
124999 0
124999 124999
0 0
62499 0
62499 62499
0 0
31249 0
31249 31249
0 0
15624 0
15624 15624
0 0
7811 0
7811 7811
0 0
3905 0
3905 3905
0 0
1952 0
1952 1952
0 0
975 0
975 975
0 0
487 0
487 487
0 0
24...

result:

ok 61 points

Test #39:

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

input:

uRumumuRuRuuRRiummiiiRuuuRRiRR
uRumumuRuRuuRRiummiiiRuuuRRiRm
uRumumuRuRuuRRiummiiiRuuuRRiRi
uRumumuRuRuuRRiummiiiRuuuRRiRm
uRumumuRuRuuRRiummiiiRuuuRRiRi
uRumumuRuRuuRRiummiiiRuuuRRiRi
uRumumuRuRuuRRiummiiiRuuuRRiRm
uRumumuRuRuuRRiummiiiRuuuRRiRi
uRumumuRuRuuRRiummiiiRuuuRRiRi
uRumumuRuRuuRRiummiii...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
500001 500001
1000000 500001
1000000 1000000
750001 750001
1000000 750001
1000000 1000000
875001 875001
1000000 875001
1000000 1000000
937501 937501
1000000 937501
1000000 1000000
968751 968751
1000000 968751
1000000 1000000
984376 984376
1000000 984376
1000...

result:

ok 61 points

Test #40:

score: 0
Accepted
time: 0ms
memory: 3520kb

input:

muiiuumiuiiuRiRiimuuRuRRRRimim
muiiuumiuiiuRiRiimuuRuRRRRimiR
muiiuumiuiiuRiRiimuuRuRRRRimii
muiiuumiuiiuRiRiimuuRuRRRRimiR
muiiuumiuiiuRiRiimuuRuRRRRimiR
muiiuumiuiiuRiRiimuuRuRRRRimii
muiiuumiuiiuRiRiimuuRuRRRRimii
muiiuumiuiiuRiRiimuuRuRRRRimiR
muiiuumiuiiuRiRiimuuRuRRRRimii
muiiuumiuiiuRiRiimuuR...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
0 500001
499999 500001
499999 1000000
0 750001
249999 750001
249999 1000000
0 875001
124999 875001
124999 1000000
0 937501
62499 937501
62499 1000000
0 968751
31249 968751
31249 1000000
0 984376
15624 984376
15624 1000000
0 992189
7811 992189
7811 1000000
0 ...

result:

ok 61 points

Test #41:

score: 0
Accepted
time: 1ms
memory: 3560kb

input:

miuiimuiiRmumuuuuRiuRiuiimummR
uumRuuuiiummiiRiimuiiiimmiuumu
uuiiuRRuiiuRRuRmumimRmRuRumRRi
uumRuuuiiummiiRiimuiiiimmiuumu
uuiiuRRuiiuRRuRmumimRmRuRumRRi
uumRuuuiiummiiRiimuiiiimmiuumu
uuiiuRRuiiuRRuRmumimRmRuRumRRi
uuiiuRRuiiuRRuRmumimRmRuRumRRi
uumRuuuiiummiiRiimuiiiimmiuumu
uuiiuRRuiiuRRuRmumimR...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
500001 0
1000000 0
1000000 499999
750001 0
1000000 0
1000000 249999
875001 0
1000000 0
1000000 124999
937501 0
1000000 0
1000000 62499
968751 0
1000000 0
1000000 31249
984376 0
1000000 0
1000000 15624
992189 0
1000000 0
1000000 7811
996095 0
1000000 0
100000...

result:

ok 61 points

Test #42:

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

input:

RuiiiuuummiRuRRumiRRiimmmRuiRi
iimiimumRimimimRiRRmiiRRRRuRRu
RiRRiuiRRuimuuimiiuiiuRuuuimRm
iimiimumRimimimRiRRmiiRRRRuRRu
iimiimumRimimimRiRRmiiRRRRuRRu
iimiimumRimimimRiRRmiiRRRRuRRu
RiRRiuiRRuimuuimiiuiiuRuuuimRm
RiRRiuiRRuimuuimiiuiiuRuuuimRm
RiRRiuiRRuimuuimiiuiiuRuuuimRm
RiRRiuiRRuimuuimiiuii...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
0 0
499999 0
499999 499999
250000 250000
499999 250000
499999 499999
250000 250000
374999 250000
374999 374999
312500 312500
374999 312500
374999 374999
312500 312500
343749 312500
343749 343749
328125 328125
343749 328125
343749 343749
328125 328125
335936 ...

result:

ok 56 points

Test #43:

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

input:

iiRiumiuimuRmumRmiiiummRiiiuRu
RumRuRuRRiiuuRuRiuRiuRmmiuRuui
iiuimiiRmRmuRumRumRmiumiRiiiiR
RumRuRuRRiiuuRuRiuRiuRmmiuRuui
iiuimiiRmRmuRumRumRmiumiRiiiiR
iiuimiiRmRmuRumRumRmiumiRiiiiR
iiuimiiRmRmuRumRumRmiumiRiiiiR
RumRuRuRRiiuuRuRiuRiuRmmiuRuui
RumRuRuRRiiuuRuRiuRiuRmmiuRuui
iiuimiiRmRmuRumRumRmi...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
500001 500001
1000000 500001
1000000 1000000
500001 500001
750000 500001
750000 750000
625001 625001
750000 625001
750000 750000
625001 625001
687500 625001
687500 687500
656251 656251
687500 656251
687500 687500
656251 656251
671875 656251
671875 671875
664...

result:

ok 59 points

Test #44:

score: 0
Accepted
time: 4ms
memory: 3576kb

input:

iiRuiRRuimuuimmummiuiuRuRmRmiu
iiRuiRRuimuuimmummiuiuRuRmRmim
iiRuiRRuimuuimmummiuiuRuRmRmiR
iiRuiRRuimuuimmummiuiuRuRmRmim
iiRuiRRuimuuimmummiuiuRuRmRmim
iiRuiRRuimuuimmummiuiuRuRmRmim
iiRuiRRuimuuimmummiuiuRuRmRmiR
iiRuiRRuimuuimmummiuiuRuRmRmim
iiRuiRRuimuuimmummiuiuRuRmRmim
iiRuiRRuimuuimmummiui...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
0 0
499999 0
499999 499999
0 0
249999 0
249999 249999
0 0
124999 0
124999 124999
0 0
62499 0
62499 62499
0 0
31249 0
31249 31249
0 0
15624 0
15624 15624
0 0
7811 0
7811 7811
0 0
3905 0
3905 3905
0 0
1952 0
1952 1952
0 0
975 0
975 975
0 0
487 0
487 487
0 0
24...

result:

ok 61 points

Test #45:

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

input:

RRRRRRRmuuuumiuuuiRRRmiuuuuRim
RRRRRRRmuuuumiuuuiRRRmiuuuuRii
RRRRRRRmuuuumiuuuiRRRmiuuuuRiu
RRRRRRRmuuuumiuuuiRRRmiuuuuRii
RRRRRRRmuuuumiuuuiRRRmiuuuuRiu
RRRRRRRmuuuumiuuuiRRRmiuuuuRiu
RRRRRRRmuuuumiuuuiRRRmiuuuuRii
RRRRRRRmuuuumiuuuiRRRmiuuuuRiu
RRRRRRRmuuuumiuuuiRRRmiuuuuRiu
RRRRRRRmuuuumiuuuiRRR...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
500001 500001
1000000 500001
1000000 1000000
750001 750001
1000000 750001
1000000 1000000
875001 875001
1000000 875001
1000000 1000000
937501 937501
1000000 937501
1000000 1000000
968751 968751
1000000 968751
1000000 1000000
984376 984376
1000000 984376
1000...

result:

ok 61 points

Test #46:

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

input:

mmuuuummRuiRummuiRmuiRiRRmRmuu
RiRRmRmuuiuRimimimiiRRRmRiuiRm
muimRiRiiRRimimiimiRuuRiumRiRR
RiRRmRmuuiuRimimimiiRRRmRiuiRm
RiRRmRmuuiuRimimimiiRRRmRiuiRm
muimRiRiiRRimimiimiRuuRiumRiRR
muimRiRiiRRimimiimiRuuRiumRiRR
RiRRmRmuuiuRimimimiiRRRmRiuiRm
muimRiRiiRRimimiimiRuuRiumRiRR
muimRiRiiRRimimiimiRu...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
0 500001
499999 500001
499999 1000000
0 750001
249999 750001
249999 1000000
0 875001
124999 875001
124999 1000000
0 937501
62499 937501
62499 1000000
0 968751
31249 968751
31249 1000000
0 984376
15624 984376
15624 1000000
0 992189
7811 992189
7811 1000000
0 ...

result:

ok 61 points

Test #47:

score: 0
Accepted
time: 3ms
memory: 3464kb

input:

iiiiRmmiuRiumRRiumimmuuRuiiuRR
iiRimRiuuRiiumiRimRiumRmRuRmum
imiimmRRuRiuuuiuuiRRmmRRRuimRu
iiRimRiuuRiiumiRimRiumRmRuRmum
imiimmRRuRiuuuiuuiRRmmRRRuimRu
iiRimRiuuRiiumiRimRiumRmRuRmum
imiimmRRuRiuuuiuuiRRmmRRRuimRu
imiimmRRuRiuuuiuuiRRmmRRRuimRu
iiRimRiuuRiiumiRimRiumRmRuRmum
imiimmRRuRiuuuiuuiRRm...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
500001 0
1000000 0
1000000 499999
750001 0
1000000 0
1000000 249999
875001 0
1000000 0
1000000 124999
937501 0
1000000 0
1000000 62499
968751 0
1000000 0
1000000 31249
984376 0
1000000 0
1000000 15624
992189 0
1000000 0
1000000 7811
996095 0
1000000 0
100000...

result:

ok 61 points

Test #48:

score: 0
Accepted
time: 0ms
memory: 3576kb

input:

RRiRRuiiuRuimRuuuuiRRuRmuimRRR
RRiRRuiiuRuimRuuuuiRRuRmuimRRi
RRiRRuiiuRuimRuuuuiRRuRmuimRRm
RRiRRuiiuRuimRuuuuiRRuRmuimRRi
RRiRRuiiuRuimRuuuuiRRuRmuimRRi
RRiRRuiiuRuimRuuuuiRRuRmuimRRi
RRiRRuiiuRuimRuuuuiRRuRmuimRRm
RRiRRuiiuRuimRuuuuiRRuRmuimRRm
RRiRRuiiuRuimRuuuuiRRuRmuimRRm
RRiRRuiiuRuimRuuuuiRR...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
0 0
499999 0
499999 499999
250000 250000
499999 250000
499999 499999
250000 250000
374999 250000
374999 374999
312500 312500
374999 312500
374999 374999
312500 312500
343749 312500
343749 343749
328125 328125
343749 328125
343749 343749
328125 328125
335936 ...

result:

ok 56 points

Test #49:

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

input:

iimmRuiuuRimRumumiuuiRRiiimiuu
iimmRuiuuRimRumumiuuiRRiiimiui
iimmRuiuuRimRumumiuuiRRiiimiuR
iimmRuiuuRimRumumiuuiRRiiimiui
iimmRuiuuRimRumumiuuiRRiiimiuR
iimmRuiuuRimRumumiuuiRRiiimiuR
iimmRuiuuRimRumumiuuiRRiiimiuR
iimmRuiuuRimRumumiuuiRRiiimiui
iimmRuiuuRimRumumiuuiRRiiimiui
iimmRuiuuRimRumumiuui...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
500001 500001
1000000 500001
1000000 1000000
500001 500001
750000 500001
750000 750000
625001 625001
750000 625001
750000 750000
625001 625001
687500 625001
687500 687500
656251 656251
687500 656251
687500 687500
656251 656251
671875 656251
671875 671875
664...

result:

ok 59 points

Test #50:

score: 0
Accepted
time: 3ms
memory: 3464kb

input:

imRmRiiuRuiimiiuuiiumiRuuuRimR
imRmRiiuRuiimiiuuiiumiRuuuRimi
imRmRiiuRuiimiiuuiiumiRuuuRimm
imRmRiiuRuiimiiuuiiumiRuuuRimi
imRmRiiuRuiimiiuuiiumiRuuuRimi
imRmRiiuRuiimiiuuiiumiRuuuRimi
imRmRiiuRuiimiiuuiiumiRuuuRimm
imRmRiiuRuiimiiuuiiumiRuuuRimi
imRmRiiuRuiimiiuuiiumiRuuuRimi
imRmRiiuRuiimiiuuiium...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
0 0
499999 0
499999 499999
0 0
249999 0
249999 249999
0 0
124999 0
124999 124999
0 0
62499 0
62499 62499
0 0
31249 0
31249 31249
0 0
15624 0
15624 15624
0 0
7811 0
7811 7811
0 0
3905 0
3905 3905
0 0
1952 0
1952 1952
0 0
975 0
975 975
0 0
487 0
487 487
0 0
24...

result:

ok 60 points

Test #51:

score: 0
Accepted
time: 3ms
memory: 3512kb

input:

mmuiRmuuiiummmRmiRuiumiRmRmRim
umRmmmRuuRuuRiuRmRumuimmiimmii
muRiimRRmmRmRmRimuiuRiRuiRuimu
umRmmmRuuRuuRiuRmRumuimmiimmii
muRiimRRmmRmRmRimuiuRiRuiRuimu
muRiimRRmmRmRmRimuiuRiRuiRuimu
umRmmmRuuRuuRiuRmRumuimmiimmii
muRiimRRmmRmRmRimuiuRiRuiRuimu
muRiimRRmmRmRmRimuiuRiRuiRuimu
umRmmmRuuRuuRiuRmRumu...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
500001 500001
1000000 500001
1000000 1000000
750001 750001
1000000 750001
1000000 1000000
875001 875001
1000000 875001
1000000 1000000
937501 937501
1000000 937501
1000000 1000000
968751 968751
1000000 968751
1000000 1000000
984376 984376
1000000 984376
1000...

result:

ok 60 points

Test #52:

score: 0
Accepted
time: 0ms
memory: 3460kb

input:

uuuuimuuiuimmRiuiimmRumimiumum
uuuuimuuiuimmRiuiimmRumimiumuu
uuuuimuuiuimmRiuiimmRumimiumui
uuuuimuuiuimmRiuiimmRumimiumuu
uuuuimuuiuimmRiuiimmRumimiumuu
uuuuimuuiuimmRiuiimmRumimiumui
uuuuimuuiuimmRiuiimmRumimiumui
uuuuimuuiuimmRiuiimmRumimiumuu
uuuuimuuiuimmRiuiimmRumimiumui
uuuuimuuiuimmRiuiimmR...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
0 500001
499999 500001
499999 1000000
0 750001
249999 750001
249999 1000000
0 875001
124999 875001
124999 1000000
0 937501
62499 937501
62499 1000000
0 968751
31249 968751
31249 1000000
0 984376
15624 984376
15624 1000000
0 992189
7811 992189
7811 1000000
0 ...

result:

ok 60 points

Test #53:

score: 0
Accepted
time: 3ms
memory: 3528kb

input:

uRiuRmRimimuiiuRRmiumumRiuumiu
uRiuRmRimimuiiuRRmiumumRiuumim
uRiuRmRimimuiiuRRmiumumRiuumii
uRiuRmRimimuiiuRRmiumumRiuumim
uRiuRmRimimuiiuRRmiumumRiuumii
uRiuRmRimimuiiuRRmiumumRiuumim
uRiuRmRimimuiiuRRmiumumRiuumii
uRiuRmRimimuiiuRRmiumumRiuumii
uRiuRmRimimuiiuRRmiumumRiuumim
uRiuRmRimimuiiuRRmium...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
500001 0
1000000 0
1000000 499999
750001 0
1000000 0
1000000 249999
875001 0
1000000 0
1000000 124999
937501 0
1000000 0
1000000 62499
968751 0
1000000 0
1000000 31249
984376 0
1000000 0
1000000 15624
992189 0
1000000 0
1000000 7811
996095 0
1000000 0
100000...

result:

ok 60 points

Test #54:

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

input:

iiuRRmuRmiRmiumuuiiRRmmmuiRmii
iiuRRmuRmiRmiumuuiiRRmmmuiRmim
iiuRRmuRmiRmiumuuiiRRmmmuiRmiR
iiuRRmuRmiRmiumuuiiRRmmmuiRmim
iiuRRmuRmiRmiumuuiiRRmmmuiRmim
iiuRRmuRmiRmiumuuiiRRmmmuiRmim
iiuRRmuRmiRmiumuuiiRRmmmuiRmiR
iiuRRmuRmiRmiumuuiiRRmmmuiRmiR
iiuRRmuRmiRmiumuuiiRRmmmuiRmiR
iiuRRmuRmiRmiumuuiiRR...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
0 0
499999 0
499999 499999
250000 250000
499999 250000
499999 499999
250000 250000
374999 250000
374999 374999
312500 312500
374999 312500
374999 374999
312500 312500
343749 312500
343749 343749
328125 328125
343749 328125
343749 343749
328125 328125
335936 ...

result:

ok 59 points

Test #55:

score: 0
Accepted
time: 3ms
memory: 3580kb

input:

uumuRuiRRRumiimmuuRRuiuiuuRRum
uumuRuiRRRumiimmuuRRuiuiuuRRui
uumuRuiRRRumiimmuuRRuiuiuuRRuu
uumuRuiRRRumiimmuuRRuiuiuuRRui
uumuRuiRRRumiimmuuRRuiuiuuRRuu
uumuRuiRRRumiimmuuRRuiuiuuRRuu
uumuRuiRRRumiimmuuRRuiuiuuRRuu
uumuRuiRRRumiimmuuRRuiuiuuRRui
uumuRuiRRRumiimmuuRRuiuiuuRRui
uumuRuiRRRumiimmuuRRu...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
500001 500001
1000000 500001
1000000 1000000
500001 500001
750000 500001
750000 750000
625001 625001
750000 625001
750000 750000
625001 625001
687500 625001
687500 687500
656251 656251
687500 656251
687500 687500
656251 656251
671875 656251
671875 671875
664...

result:

ok 60 points

Test #56:

score: 0
Accepted
time: 3ms
memory: 3560kb

input:

RRuiiummuumuiuRiiuummuuimRRRmm
mRiuimumRmuRuiiiiimmmuRRRimmmi
mRiuimumRmuRuiiiiimmmuRRRimmmi
uuRuRuiRuRiRumRiimiiRuRuuimiiu
mRiuimumRmuRuiiiiimmmuRRRimmmi
uuRuRuiRuRiRumRiimiiRuRuuimiiu
mRiuimumRmuRuiiiiimmmuRRRimmmi
uuRuRuiRuRiRumRiimiiRuRuuimiiu
uuRuRuiRuRiRumRiimiiRuRuuimiiu
mRiuimumRmuRuiiiiimmm...

output:

1 0
0 0
0 1
0 0
0 1000000
1000000 0
1000000 1000000
1000000 999999
0 0
999999 0
1 0
499999 0
1 0
249999 0
1 0
124999 0
1 0
62499 0
1 0
31249 0
1 0
15624 0
1 0
7812 0
1 0
3906 0
1 0
1953 0
1 0
976 0
1 0
488 0
1 0
244 0
1 0
122 0
1 0
61 0
1 0
30 0
1 0
15 0
1 0
7 0
1 0
3 0
2 0

result:

ok 47 points

Test #57:

score: 0
Accepted
time: 3ms
memory: 3540kb

input:

RuiiiumiRiuuumuimRRmimmuiumiim
muuiRmuuRuummiRiiuimiuiiumuRRR
umuuiuiumRmiRmuuuuumiRmimmiiiu
muuiRmuuRuummiRiiuimiuiiumuRRR
umuuiuiumRmiRmuuuuumiRmimmiiiu
umuuiuiumRmiRmuuuuumiRmimmiiiu
muuiRmuuRuummiRiiuimiuiiumuRRR
umuuiuiumRmiRmuuuuumiRmimmiiiu
umuuiuiumRmiRmuuuuumiRmimmiiiu
muuiRmuuRuummiRiiuimi...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
500001 500001
1000000 500001
1000000 1000000
750001 750001
1000000 750001
1000000 1000000
875001 875001
1000000 875001
1000000 1000000
937501 937501
1000000 937501
1000000 1000000
968751 968751
1000000 968751
1000000 1000000
984376 984376
1000000 984376
1000...

result:

ok 61 points

Test #58:

score: 0
Accepted
time: 4ms
memory: 3492kb

input:

muuuuiiRmiiuRmuimuimimuRimmRui
iiRimRRiRRRiuRuuimRumiiuuimmiu
RiRumimuiRmimuuRuRuRmmRimumuRm
iiRimRRiRRRiuRuuimRumiiuuimmiu
iiRimRRiRRRiuRuuimRumiiuuimmiu
RiRumimuiRmimuuRuRuRmmRimumuRm
RiRumimuiRmimuuRuRuRmmRimumuRm
iiRimRRiRRRiuRuuimRumiiuuimmiu
RiRumimuiRmimuuRuRuRmmRimumuRm
RiRumimuiRmimuuRuRuRm...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
0 500001
499999 500001
499999 1000000
0 750001
249999 750001
249999 1000000
0 875001
124999 875001
124999 1000000
0 937501
62499 937501
62499 1000000
0 968751
31249 968751
31249 1000000
0 984376
15624 984376
15624 1000000
0 992189
7811 992189
7811 1000000
0 ...

result:

ok 60 points

Test #59:

score: 0
Accepted
time: 3ms
memory: 3592kb

input:

iuiRiiRiiuiuiuimmRmmmimuumiRRu
iuiRiiRiiuiuiuimmRmmmimuumiRRi
iuiRiiRiiuiuiuimmRmmmimuumiRRi
iuiRiiRiiuiuiuimmRmmmimuumiRRR
iuiRiiRiiuiuiuimmRmmmimuumiRRi
iuiRiiRiiuiuiuimmRmmmimuumiRRR
iuiRiiRiiuiuiuimmRmmmimuumiRRi
iuiRiiRiiuiuiuimmRmmmimuumiRRR
iuiRiiRiiuiuiuimmRmmmimuumiRRR
iuiRiiRiiuiuiuimmRmmm...

output:

1 0
0 0
0 1
0 0
0 1000000
1000000 0
1000000 1000000
1000000 999999
0 0
999999 0
500001 0
999999 0
750001 0
999999 0
875001 0
999999 0
937501 0
999999 0
968751 0
999999 0
984376 0
999999 0
992188 0
999999 0
996094 0
999999 0
998047 0
999999 0
999024 0
999999 0
999512 0
999999 0
999756 0
999999 0
9998...

result:

ok 47 points

Test #60:

score: 0
Accepted
time: 0ms
memory: 3540kb

input:

iiRmmRuumuuRiimRuuRuiuuiiRmuuu
imiiuumRumiRumiimuuRuRRiuimiiR
RRuumiRumiiiuRimmRmiiRiuumuRRi
imiiuumRumiRumiimuuRuRRiuimiiR
imiiuumRumiRumiimuuRuRRiuimiiR
imiiuumRumiRumiimuuRuRRiuimiiR
RRuumiRumiiiuRimmRmiiRiuumuRRi
RRuumiRumiiiuRimmRmiiRiuumuRRi
RRuumiRumiiiuRimmRmiiRiuumuRRi
RRuumiRumiiiuRimmRmii...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
0 0
499999 0
499999 499999
250000 250000
499999 250000
499999 499999
250000 250000
374999 250000
374999 374999
312500 312500
374999 312500
374999 374999
312500 312500
343749 312500
343749 343749
328125 328125
343749 328125
343749 343749
328125 328125
335936 ...

result:

ok 56 points

Test #61:

score: 0
Accepted
time: 1ms
memory: 3528kb

input:

RmiRRmmRuuuRmRiRumRmmuuRiummim
iuRRRmRuuuRummmmuuiummRmRRmuii
mmmmimiimRRRummRmiRuuuumRiuiiR
iuRRRmRuuuRummmmuuiummRmRRmuii
mmmmimiimRRRummRmiRuuuumRiuiiR
mmmmimiimRRRummRmiRuuuumRiuiiR
mmmmimiimRRRummRmiRuuuumRiuiiR
iuRRRmRuuuRummmmuuiummRmRRmuii
iuRRRmRuuuRummmmuuiummRmRRmuii
mmmmimiimRRRummRmiRuu...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
500001 500001
1000000 500001
1000000 1000000
500001 500001
750000 500001
750000 750000
625001 625001
750000 625001
750000 750000
625001 625001
687500 625001
687500 687500
656251 656251
687500 656251
687500 687500
656251 656251
671875 656251
671875 671875
664...

result:

ok 59 points

Test #62:

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

input:

RmRuimiiRRmmRmRiRuRiuuuiiiimiu
RmRuimiiRRmmRmRiRuRiuuuiiiimim
RmRuimiiRRmmRmRiRuRiuuuiiiimii
RmRuimiiRRmmRmRiRuRiuuuiiiimim
RmRuimiiRRmmRmRiRuRiuuuiiiimim
RmRuimiiRRmmRmRiRuRiuuuiiiimim
RmRuimiiRRmmRmRiRuRiuuuiiiimii
RmRuimiiRRmmRmRiRuRiuuuiiiimim
RmRuimiiRRmmRmRiRuRiuuuiiiimim
RmRuimiiRRmmRmRiRuRiu...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
0 0
499999 0
499999 499999
0 0
249999 0
249999 249999
0 0
124999 0
124999 124999
0 0
62499 0
62499 62499
0 0
31249 0
31249 31249
0 0
15624 0
15624 15624
0 0
7811 0
7811 7811
0 0
3905 0
3905 3905
0 0
1952 0
1952 1952
0 0
975 0
975 975
0 0
487 0
487 487
0 0
24...

result:

ok 61 points

Test #63:

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

input:

RRuRuRiiRiiuimRumiumiumuuiRimi
RRuRuRiiRiiuimRumiumiumuuiRimm
RRuRuRiiRiiuimRumiumiumuuiRimu
RRuRuRiiRiiuimRumiumiumuuiRimm
RRuRuRiiRiiuimRumiumiumuuiRimu
RRuRuRiiRiiuimRumiumiumuuiRimu
RRuRuRiiRiiuimRumiumiumuuiRimm
RRuRuRiiRiiuimRumiumiumuuiRimu
RRuRuRiiRiiuimRumiumiumuuiRimu
RRuRuRiiRiiuimRumiumi...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
500001 500001
1000000 500001
1000000 1000000
750001 750001
1000000 750001
1000000 1000000
875001 875001
1000000 875001
1000000 1000000
937501 937501
1000000 937501
1000000 1000000
968751 968751
1000000 968751
1000000 1000000
984376 984376
1000000 984376
1000...

result:

ok 61 points

Test #64:

score: 0
Accepted
time: 3ms
memory: 3560kb

input:

RmRuRRmmimmiiiRRmmuumRmRuumuii
mmRRiiRRumuuRiiRmRumimiiRuRimR
RumRmiRRuRRmuRuuimRuuRiiumRRmu
mmRRiiRRumuuRiiRmRumimiiRuRimR
mmRRiiRRumuuRiiRmRumimiiRuRimR
RumRmiRRuRRmuRuuimRuuRiiumRRmu
RumRmiRRuRRmuRuuimRuuRiiumRRmu
mmRRiiRRumuuRiiRmRumimiiRuRimR
RumRmiRRuRRmuRuuimRuuRiiumRRmu
RumRmiRRuRRmuRuuimRuu...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
0 500001
499999 500001
499999 1000000
0 750001
249999 750001
249999 1000000
0 875001
124999 875001
124999 1000000
0 937501
62499 937501
62499 1000000
0 968751
31249 968751
31249 1000000
0 984376
15624 984376
15624 1000000
0 992189
7811 992189
7811 1000000
0 ...

result:

ok 61 points

Test #65:

score: 0
Accepted
time: 4ms
memory: 3524kb

input:

mRmRiuRmumRRRuiuimmuRRRmiummRi
RumiuRuimmmmuiiRuumiiuuuiummiu
RmuuRuiiiiiRuRimmuuiuiuuumuiuR
RumiuRuimmmmuiiRuumiiuuuiummiu
RmuuRuiiiiiRuRimmuuiuiuuumuiuR
RumiuRuimmmmuiiRuumiiuuuiummiu
RmuuRuiiiiiRuRimmuuiuiuuumuiuR
RmuuRuiiiiiRuRimmuuiuiuuumuiuR
RumiuRuimmmmuiiRuumiiuuuiummiu
RmuuRuiiiiiRuRimmuuiu...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
500001 0
1000000 0
1000000 499999
750001 0
1000000 0
1000000 249999
875001 0
1000000 0
1000000 124999
937501 0
1000000 0
1000000 62499
968751 0
1000000 0
1000000 31249
984376 0
1000000 0
1000000 15624
992189 0
1000000 0
1000000 7811
996095 0
1000000 0
100000...

result:

ok 61 points

Test #66:

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

input:

imRmRimiiRRmuimRuiuRmiiRRmmmmm
RiiimRuuRuiiiiuRiRiimRmRRmummR
muRimiiRmRuiiimmimmimuiuRRRuii
RiiimRuuRuiiiiuRiRiimRmRRmummR
RiiimRuuRuiiiiuRiRiimRmRRmummR
RiiimRuuRuiiiiuRiRiimRmRRmummR
muRimiiRmRuiiimmimmimuiuRRRuii
muRimiiRmRuiiimmimmimuiuRRRuii
muRimiiRmRuiiimmimmimuiuRRRuii
muRimiiRmRuiiimmimmim...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
0 0
499999 0
499999 499999
250000 250000
499999 250000
499999 499999
250000 250000
374999 250000
374999 374999
312500 312500
374999 312500
374999 374999
312500 312500
343749 312500
343749 343749
328125 328125
343749 328125
343749 343749
328125 328125
335936 ...

result:

ok 55 points

Test #67:

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

input:

uRmiumRmRmRmimuimiiRmummRuummR
iummRiRmimRuiRRuRimuumiuRuuRRm
imuuuiimiuRRiuiRmuumiuuiRuuumu
iummRiRmimRuiRRuRimuumiuRuuRRm
imuuuiimiuRRiuiRmuumiuuiRuuumu
imuuuiimiuRRiuiRmuumiuuiRuuumu
imuuuiimiuRRiuiRmuumiuuiRuuumu
iummRiRmimRuiRRuRimuumiuRuuRRm
iummRiRmimRuiRRuRimuumiuRuuRRm
imuuuiimiuRRiuiRmuumi...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
500001 500001
1000000 500001
1000000 1000000
500001 500001
750000 500001
750000 750000
625001 625001
750000 625001
750000 750000
625001 625001
687500 625001
687500 687500
656251 656251
687500 656251
687500 687500
656251 656251
671875 656251
671875 671875
664...

result:

ok 58 points

Test #68:

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

input:

uRuuRiimimuumummumRumumRmmiiii
iuiRRuuRmRRRRiiuiRRuuRiiuRmRuR
iRRimuiummRRuuiiiRRuRuiiRmmimu
iuiRRuuRmRRRRiiuiRRuuRiiuRmRuR
iuiRRuuRmRRRRiiuiRRuuRiiuRmRuR
iuiRRuuRmRRRRiiuiRRuuRiiuRmRuR
iRRimuiummRRuuiiiRRuRuiiRmmimu
iuiRRuuRmRRRRiiuiRRuuRiiuRmRuR
iuiRRuuRmRRRRiiuiRRuuRiiuRmRuR
iRRimuiummRRuuiiiRRuR...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
0 0
499999 0
499999 499999
0 0
249999 0
249999 249999
0 0
124999 0
124999 124999
0 0
62499 0
62499 62499
0 0
31249 0
31249 31249
0 0
15624 0
15624 15624
0 0
7811 0
7811 7811
0 0
3905 0
3905 3905
0 0
1952 0
1952 1952
0 0
975 0
975 975
0 0
487 0
487 487
0 0
24...

result:

ok 60 points

Test #69:

score: 0
Accepted
time: 4ms
memory: 3468kb

input:

RRRmuiiiRuuiiiRmiRmuRiRimumuuu
RRRmuiiiRuuiiiRmiRmuRiRimumuum
RRRmuiiiRuuiiiRmiRmuRiRimumuuR
RRRmuiiiRuuiiiRmiRmuRiRimumuum
RRRmuiiiRuuiiiRmiRmuRiRimumuuR
RRRmuiiiRuuiiiRmiRmuRiRimumuuR
RRRmuiiiRuuiiiRmiRmuRiRimumuum
RRRmuiiiRuuiiiRmiRmuRiRimumuuR
RRRmuiiiRuuiiiRmiRmuRiRimumuuR
RRRmuiiiRuuiiiRmiRmuR...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
500001 500001
1000000 500001
1000000 1000000
750001 750001
1000000 750001
1000000 1000000
875001 875001
1000000 875001
1000000 1000000
937501 937501
1000000 937501
1000000 1000000
968751 968751
1000000 968751
1000000 1000000
984376 984376
1000000 984376
1000...

result:

ok 58 points

Test #70:

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

input:

iuiuuRiRmRRuiRmmmmumRimuRumiuu
iuiuuRiRmRRuiRmmmmumRimuRumiui
iuiuuRiRmRRuiRmmmmumRimuRumiuR
iuiuuRiRmRRuiRmmmmumRimuRumiui
iuiuuRiRmRRuiRmmmmumRimuRumiui
iuiuuRiRmRRuiRmmmmumRimuRumiuR
iuiuuRiRmRRuiRmmmmumRimuRumiuR
iuiuuRiRmRRuiRmmmmumRimuRumiui
iuiuuRiRmRRuiRmmmmumRimuRumiuR
iuiuuRiRmRRuiRmmmmumR...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
0 500001
499999 500001
499999 1000000
0 750001
249999 750001
249999 1000000
0 875001
124999 875001
124999 1000000
0 937501
62499 937501
62499 1000000
0 968751
31249 968751
31249 1000000
0 984376
15624 984376
15624 1000000
0 992189
7811 992189
7811 1000000
0 ...

result:

ok 59 points

Test #71:

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

input:

RmiRRmmuuiuiiiuuRiRmimimRiiuuu
RmiRRmmuuiuiiiuuRiRmimimRiiuum
RmiRRmmuuiuiiiuuRiRmimimRiiuuR
RmiRRmmuuiuiiiuuRiRmimimRiiuum
RmiRRmmuuiuiiiuuRiRmimimRiiuuR
RmiRRmmuuiuiiiuuRiRmimimRiiuum
RmiRRmmuuiuiiiuuRiRmimimRiiuuR
RmiRRmmuuiuiiiuuRiRmimimRiiuuR
RmiRRmmuuiuiiiuuRiRmimimRiiuum
RmiRRmmuuiuiiiuuRiRmi...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
500001 0
1000000 0
1000000 499999
750001 0
1000000 0
1000000 249999
875001 0
1000000 0
1000000 124999
937501 0
1000000 0
1000000 62499
968751 0
1000000 0
1000000 31249
984376 0
1000000 0
1000000 15624
992189 0
1000000 0
1000000 7811
996095 0
1000000 0
100000...

result:

ok 61 points

Test #72:

score: 0
Accepted
time: 3ms
memory: 3468kb

input:

mRRimiRmmiRuRiRmRuiRRRiimuimmu
mRRimiRmmiRuRiRmRuiRRRiimuimmi
mRRimiRmmiRuRiRmRuiRRRiimuimmm
mRRimiRmmiRuRiRmRuiRRRiimuimmi
mRRimiRmmiRuRiRmRuiRRRiimuimmi
mRRimiRmmiRuRiRmRuiRRRiimuimmi
mRRimiRmmiRuRiRmRuiRRRiimuimmm
mRRimiRmmiRuRiRmRuiRRRiimuimmm
mRRimiRmmiRuRiRmRuiRRRiimuimmm
mRRimiRmmiRuRiRmRuiRR...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
0 0
499999 0
499999 499999
250000 250000
499999 250000
499999 499999
250000 250000
374999 250000
374999 374999
312500 312500
374999 312500
374999 374999
312500 312500
343749 312500
343749 343749
328125 328125
343749 328125
343749 343749
328125 328125
335936 ...

result:

ok 55 points

Test #73:

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

input:

mmRimiRiiuimiiiimRuRmimiuiiRmi
mmRimiRiiuimiiiimRuRmimiuiiRmm
mmRimiRiiuimiiiimRuRmimiuiiRmR
mmRimiRiiuimiiiimRuRmimiuiiRmm
mmRimiRiiuimiiiimRuRmimiuiiRmR
mmRimiRiiuimiiiimRuRmimiuiiRmR
mmRimiRiiuimiiiimRuRmimiuiiRmR
mmRimiRiiuimiiiimRuRmimiuiiRmm
mmRimiRiiuimiiiimRuRmimiuiiRmm
mmRimiRiiuimiiiimRuRm...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
500001 500001
1000000 500001
1000000 1000000
500001 500001
750000 500001
750000 750000
625001 625001
750000 625001
750000 750000
625001 625001
687500 625001
687500 687500
656251 656251
687500 656251
687500 687500
656251 656251
671875 656251
671875 671875
664...

result:

ok 58 points

Test #74:

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

input:

imiRimummmuRmRmRmimiRuuuimRRmR
iuumRRRummmmiRumRumiumRuiimmmm
uRuRRRumuummimuRmmmmmiuiumRiiu
iuumRRRummmmiRumRumiumRuiimmmm
iuumRRRummmmiRumRumiumRuiimmmm
iuumRRRummmmiRumRumiumRuiimmmm
uRuRRRumuummimuRmmmmmiuiumRiiu
iuumRRRummmmiRumRumiumRuiimmmm
iuumRRRummmmiRumRumiumRuiimmmm
uRuRRRumuummimuRmmmmm...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
0 0
499999 0
499999 499999
0 0
249999 0
249999 249999
0 0
124999 0
124999 124999
0 0
62499 0
62499 62499
0 0
31249 0
31249 31249
0 0
15624 0
15624 15624
0 0
7811 0
7811 7811
0 0
3905 0
3905 3905
0 0
1952 0
1952 1952
0 0
975 0
975 975
0 0
487 0
487 487
0 0
24...

result:

ok 59 points

Test #75:

score: 0
Accepted
time: 0ms
memory: 3468kb

input:

miiRummRRmRumiiumiuuumuRmuiiiu
miiRummRRmRumiiumiuuumuRmuiiim
miiRummRRmRumiiumiuuumuRmuiiiR
miiRummRRmRumiiumiuuumuRmuiiim
miiRummRRmRumiiumiuuumuRmuiiiR
miiRummRRmRumiiumiuuumuRmuiiiR
miiRummRRmRumiiumiuuumuRmuiiim
miiRummRRmRumiiumiuuumuRmuiiiR
miiRummRRmRumiiumiuuumuRmuiiiR
miiRummRRmRumiiumiuuu...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
500001 500001
1000000 500001
1000000 1000000
750001 750001
1000000 750001
1000000 1000000
875001 875001
1000000 875001
1000000 1000000
937501 937501
1000000 937501
1000000 1000000
968751 968751
1000000 968751
1000000 1000000
984376 984376
1000000 984376
1000...

result:

ok 58 points

Test #76:

score: 0
Accepted
time: 3ms
memory: 3460kb

input:

mimmuumiuimmRRuRuumuimiuRiRuii
imuimimmRRiRuRmiRimmiRuuRiRimu
RimRimimmmmRmiimiuRummumRRmmuR
imuimimmRRiRuRmiRimmiRuuRiRimu
imuimimmRRiRuRmiRimmiRuuRiRimu
RimRimimmmmRmiimiuRummumRRmmuR
RimRimimmmmRmiimiuRummumRRmmuR
imuimimmRRiRuRmiRimmiRuuRiRimu
RimRimimmmmRmiimiuRummumRRmmuR
RimRimimmmmRmiimiuRum...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
0 500001
499999 500001
499999 1000000
0 750001
249999 750001
249999 1000000
0 875001
124999 875001
124999 1000000
0 937501
62499 937501
62499 1000000
0 968751
31249 968751
31249 1000000
0 984376
15624 984376
15624 1000000
0 992189
7811 992189
7811 1000000
0 ...

result:

ok 59 points

Test #77:

score: 0
Accepted
time: 0ms
memory: 3520kb

input:

uimuRRiRmmiuRumiRumiRiuiRRuiui
uimuRRiRmmiuRumiRumiRiuiRRuiuu
uimuRRiRmmiuRumiRumiRiuiRRuiuR
uimuRRiRmmiuRumiRumiRiuiRRuiuu
uimuRRiRmmiuRumiRumiRiuiRRuiuR
uimuRRiRmmiuRumiRumiRiuiRRuiuu
uimuRRiRmmiuRumiRumiRiuiRRuiuR
uimuRRiRmmiuRumiRumiRiuiRRuiuR
uimuRRiRmmiuRumiRumiRiuiRRuiuu
uimuRRiRmmiuRumiRumiR...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
500001 0
1000000 0
1000000 499999
750001 0
1000000 0
1000000 249999
875001 0
1000000 0
1000000 124999
937501 0
1000000 0
1000000 62499
968751 0
1000000 0
1000000 31249
984376 0
1000000 0
1000000 15624
992189 0
1000000 0
1000000 7811
996095 0
1000000 0
100000...

result:

ok 58 points

Test #78:

score: 0
Accepted
time: 0ms
memory: 3452kb

input:

mRRmmmuiuiumRuRRmmuuimRuRmRuui
mRRmmmuiuiumRuRRmmuuimRuRmRuuR
mRRmmmuiuiumRuRRmmuuimRuRmRuum
mRRmmmuiuiumRuRRmmuuimRuRmRuuR
mRRmmmuiuiumRuRRmmuuimRuRmRuuR
mRRmmmuiuiumRuRRmmuuimRuRmRuuR
mRRmmmuiuiumRuRRmmuuimRuRmRuum
mRRmmmuiuiumRuRRmmuuimRuRmRuum
mRRmmmuiuiumRuRRmmuuimRuRmRuum
mRRmmmuiuiumRuRRmmuui...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
0 0
499999 0
499999 499999
250000 250000
499999 250000
499999 499999
250000 250000
374999 250000
374999 374999
312500 312500
374999 312500
374999 374999
312500 312500
343749 312500
343749 343749
328125 328125
343749 328125
343749 343749
328125 328125
335936 ...

result:

ok 61 points

Test #79:

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

input:

imiiRuRmRuRRmimmRRRuumuRmmimRi
imiiRuRmRuRRmimmRRRuumuRmmimRm
imiiRuRmRuRRmimmRRRuumuRmmimRu
imiiRuRmRuRRmimmRRRuumuRmmimRm
imiiRuRmRuRRmimmRRRuumuRmmimRu
imiiRuRmRuRRmimmRRRuumuRmmimRu
imiiRuRmRuRRmimmRRRuumuRmmimRu
imiiRuRmRuRRmimmRRRuumuRmmimRm
imiiRuRmRuRRmimmRRRuumuRmmimRm
imiiRuRmRuRRmimmRRRuu...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
500001 500001
1000000 500001
1000000 1000000
500001 500001
750000 500001
750000 750000
625001 625001
750000 625001
750000 750000
625001 625001
687500 625001
687500 687500
656251 656251
687500 656251
687500 687500
656251 656251
671875 656251
671875 671875
664...

result:

ok 61 points

Test #80:

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

input:

mimmuRmRuRiuuiiRRiuiuRmmiRiuiR
RimimmRRiuRRRiuumimmiimiiRRRmm
RimimmRRiuRRRiuumimmiimiiRRRmm
uRiiiimiiRimiuimRRRummRuRuRuuu
RimimmRRiuRRRiuumimmiimiiRRRmm
uRiiiimiiRimiuimRRRummRuRuRuuu
RimimmRRiuRRRiuumimmiimiiRRRmm
uRiiiimiiRimiuimRRRummRuRuRuuu
uRiiiimiiRimiuimRRRummRuRuRuuu
RimimmRRiuRRRiuumimmi...

output:

1 0
0 0
0 1
0 0
0 1000000
1000000 0
1000000 1000000
1000000 999999
0 0
999999 0
1 0
499999 0
1 0
249999 0
1 0
124999 0
1 0
62499 0
1 0
31249 0
1 0
15624 0
1 0
7812 0
1 0
3906 0
1 0
1953 0
1 0
976 0
1 0
488 0
1 0
244 0
1 0
122 0
1 0
61 0
1 0
30 0
1 0
15 0
1 0
7 0
1 0
3 0

result:

ok 46 points

Test #81:

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

input:

uuuuumuRiimmuRiiuimuRuiiiRummi
umiummiuiuuRmiRmuumuRuRumRimmR
mmiuiiiiumRuRiuuiuRiuummimRRmu
umiummiuiuuRmiRmuumuRuRumRimmR
mmiuiiiiumRuRiuuiuRiuummimRRmu
mmiuiiiiumRuRiuuiuRiuummimRRmu
umiummiuiuuRmiRmuumuRuRumRimmR
mmiuiiiiumRuRiuuiuRiuummimRRmu
mmiuiiiiumRuRiuuiuRiuummimRRmu
umiummiuiuuRmiRmuumuR...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
500001 500001
1000000 500001
1000000 1000000
750001 750001
1000000 750001
1000000 1000000
875001 875001
1000000 875001
1000000 1000000
937501 937501
1000000 937501
1000000 1000000
968751 968751
1000000 968751
1000000 1000000
984376 984376
1000000 984376
1000...

result:

ok 59 points

Test #82:

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

input:

RmiRRRiiumimumRRmuRRuRRRRumRiR
RmiRRRiiumimumRRmuRRuRRRRumRim
RmiRRRiiumimumRRmuRRuRRRRumRii
RmiRRRiiumimumRRmuRRuRRRRumRim
RmiRRRiiumimumRRmuRRuRRRRumRim
RmiRRRiiumimumRRmuRRuRRRRumRii
RmiRRRiiumimumRRmuRRuRRRRumRii
RmiRRRiiumimumRRmuRRuRRRRumRim
RmiRRRiiumimumRRmuRRuRRRRumRii
RmiRRRiiumimumRRmuRRu...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
0 500001
499999 500001
499999 1000000
0 750001
249999 750001
249999 1000000
0 875001
124999 875001
124999 1000000
0 937501
62499 937501
62499 1000000
0 968751
31249 968751
31249 1000000
0 984376
15624 984376
15624 1000000
0 992189
7811 992189
7811 1000000
0 ...

result:

ok 59 points

Test #83:

score: 0
Accepted
time: 3ms
memory: 3476kb

input:

mmmmuumumiRimmRiuuumRuiimumimi
mmmmuumumiRimmRiuuumRuiimumimR
mmmmuumumiRimmRiuuumRuiimumimR
mmmmuumumiRimmRiuuumRuiimumimm
mmmmuumumiRimmRiuuumRuiimumimR
mmmmuumumiRimmRiuuumRuiimumimm
mmmmuumumiRimmRiuuumRuiimumimR
mmmmuumumiRimmRiuuumRuiimumimm
mmmmuumumiRimmRiuuumRuiimumimm
mmmmuumumiRimmRiuuumR...

output:

1 0
0 0
0 1
0 0
0 1000000
1000000 0
1000000 1000000
1000000 999999
0 0
999999 0
500001 0
999999 0
750001 0
999999 0
875001 0
999999 0
937501 0
999999 0
968751 0
999999 0
984376 0
999999 0
992188 0
999999 0
996094 0
999999 0
998047 0
999999 0
999024 0
999999 0
999512 0
999999 0
999756 0
999999 0
9998...

result:

ok 45 points

Test #84:

score: 0
Accepted
time: 1ms
memory: 3520kb

input:

RmuiRimimRmiiiuRRiRmmmimmiimuu
RmuiRimimRmiiiuRRiRmmmimmiimui
RmuiRimimRmiiiuRRiRmmmimmiimuR
RmuiRimimRmiiiuRRiRmmmimmiimui
RmuiRimimRmiiiuRRiRmmmimmiimui
RmuiRimimRmiiiuRRiRmmmimmiimui
RmuiRimimRmiiiuRRiRmmmimmiimuR
RmuiRimimRmiiiuRRiRmmmimmiimuR
RmuiRimimRmiiiuRRiRmmmimmiimuR
RmuiRimimRmiiiuRRiRmm...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
0 0
499999 0
499999 499999
250000 250000
499999 250000
499999 499999
250000 250000
374999 250000
374999 374999
312500 312500
374999 312500
374999 374999
312500 312500
343749 312500
343749 343749
328125 328125
343749 328125
343749 343749
328125 328125
335936 ...

result:

ok 61 points

Test #85:

score: 0
Accepted
time: 0ms
memory: 3524kb

input:

RRRRRuuRRuRuuiuuimiRRiiiuuiiRu
miuuuuuumiRiRmumRRRuiuumRuumim
uiRumRiuRRRmimRumiiuRimRmuuiui
miuuuuuumiRiRmumRRRuiuumRuumim
uiRumRiuRRRmimRumiiuRimRmuuiui
uiRumRiuRRRmimRumiiuRimRmuuiui
uiRumRiuRRRmimRumiiuRimRmuuiui
miuuuuuumiRiRmumRRRuiuumRuumim
miuuuuuumiRiRmumRRRuiuumRuumim
uiRumRiuRRRmimRumiiuR...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
500001 500001
1000000 500001
1000000 1000000
500001 500001
750000 500001
750000 750000
625001 625001
750000 625001
750000 750000
625001 625001
687500 625001
687500 687500
656251 656251
687500 656251
687500 687500
656251 656251
671875 656251
671875 671875
664...

result:

ok 61 points

Test #86:

score: 0
Accepted
time: 4ms
memory: 3564kb

input:

iimmmumiRRRmuRiiRmimumRmmumuim
RuummiuuiRmuiuRumumiRmmuRuiuRi
imuimuuiiumiuiuumiRuRmRRmRRmmu
RuummiuuiRmuiuRumumiRmmuRuiuRi
RuummiuuiRmuiuRumumiRmmuRuiuRi
RuummiuuiRmuiuRumumiRmmuRuiuRi
imuimuuiiumiuiuumiRuRmRRmRRmmu
RuummiuuiRmuiuRumumiRmmuRuiuRi
RuummiuuiRmuiuRumumiRmmuRuiuRi
imuimuuiiumiuiuumiRuR...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
0 0
499999 0
499999 499999
0 0
249999 0
249999 249999
0 0
124999 0
124999 124999
0 0
62499 0
62499 62499
0 0
31249 0
31249 31249
0 0
15624 0
15624 15624
0 0
7811 0
7811 7811
0 0
3905 0
3905 3905
0 0
1952 0
1952 1952
0 0
975 0
975 975
0 0
487 0
487 487
0 0
24...

result:

ok 60 points

Test #87:

score: 0
Accepted
time: 0ms
memory: 3568kb

input:

RuimuumuummRiuiiRimmiRuRRuRimR
RuimuumuummRiuiiRimmiRuRRuRimi
RuimuumuummRiuiiRimmiRuRRuRimm
RuimuumuummRiuiiRimmiRuRRuRimi
RuimuumuummRiuiiRimmiRuRRuRimm
RuimuumuummRiuiiRimmiRuRRuRimm
RuimuumuummRiuiiRimmiRuRRuRimi
RuimuumuummRiuiiRimmiRuRRuRimm
RuimuumuummRiuiiRimmiRuRRuRimm
RuimuumuummRiuiiRimmi...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
500001 500001
1000000 500001
1000000 1000000
750001 750001
1000000 750001
1000000 1000000
875001 875001
1000000 875001
1000000 1000000
937501 937501
1000000 937501
1000000 1000000
968751 968751
1000000 968751
1000000 1000000
984376 984376
1000000 984376
1000...

result:

ok 60 points

Test #88:

score: 0
Accepted
time: 3ms
memory: 3520kb

input:

mmuRiRRRRRuummmRuRuumuRRiumRiu
miRRimmiuimuiumiiuuuuumuRiimRi
RiimiimuiumiiumRmRRuRmiuiuuium
miRRimmiuimuiumiiuuuuumuRiimRi
miRRimmiuimuiumiiuuuuumuRiimRi
RiimiimuiumiiumRmRRuRmiuiuuium
RiimiimuiumiiumRmRRuRmiuiuuium
miRRimmiuimuiumiiuuuuumuRiimRi
RiimiimuiumiiumRmRRuRmiuiuuium
RiimiimuiumiiumRmRRuR...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
0 500001
499999 500001
499999 1000000
0 750001
249999 750001
249999 1000000
0 875001
124999 875001
124999 1000000
0 937501
62499 937501
62499 1000000
0 968751
31249 968751
31249 1000000
0 984376
15624 984376
15624 1000000
0 992189
7811 992189
7811 1000000
0 ...

result:

ok 60 points

Test #89:

score: 0
Accepted
time: 1ms
memory: 3528kb

input:

iiRumumuRuRmiumuRumRiRuuiiummm
mRiiuRumRRmmmuuuuiRmRRmuiuRuRR
uRRRuuuiRmiuiuRiimuuiiimRmuuiu
mRiiuRumRRmmmuuuuiRmRRmuiuRuRR
uRRRuuuiRmiuiuRiimuuiiimRmuuiu
mRiiuRumRRmmmuuuuiRmRRmuiuRuRR
uRRRuuuiRmiuiuRiimuuiiimRmuuiu
uRRRuuuiRmiuiuRiimuuiiimRmuuiu
mRiiuRumRRmmmuuuuiRmRRmuiuRuRR
uRRRuuuiRmiuiuRiimuui...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
500001 0
1000000 0
1000000 499999
750001 0
1000000 0
1000000 249999
875001 0
1000000 0
1000000 124999
937501 0
1000000 0
1000000 62499
968751 0
1000000 0
1000000 31249
984376 0
1000000 0
1000000 15624
992189 0
1000000 0
1000000 7811
996095 0
1000000 0
100000...

result:

ok 60 points

Test #90:

score: 0
Accepted
time: 3ms
memory: 3524kb

input:

RmRiRmRiuiimmmiuRuRuRuuumRuium
RmRiRmRiuiimmmiuRuRuRuuumRuiuR
RmRiRmRiuiimmmiuRuRuRuuumRuiuu
RmRiRmRiuiimmmiuRuRuRuuumRuiuR
RmRiRmRiuiimmmiuRuRuRuuumRuiuR
RmRiRmRiuiimmmiuRuRuRuuumRuiuR
RmRiRmRiuiimmmiuRuRuRuuumRuiuu
RmRiRmRiuiimmmiuRuRuRuuumRuiuu
RmRiRmRiuiimmmiuRuRuRuuumRuiuu
RmRiRmRiuiimmmiuRuRuR...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
0 0
499999 0
499999 499999
250000 250000
499999 250000
499999 499999
250000 250000
374999 250000
374999 374999
312500 312500
374999 312500
374999 374999
312500 312500
343749 312500
343749 343749
328125 328125
343749 328125
343749 343749
328125 328125
335936 ...

result:

ok 55 points

Test #91:

score: 0
Accepted
time: 3ms
memory: 3568kb

input:

iuiiiuuimimRuiRuRiRuuuuiiimmui
RuuumRmuiRmuRiuiuRRRRmRuRiRRmR
miiRRuRumiiiimmmiiuuuRRuRRmmiu
RuuumRmuiRmuRiuiuRRRRmRuRiRRmR
miiRRuRumiiiimmmiiuuuRRuRRmmiu
miiRRuRumiiiimmmiiuuuRRuRRmmiu
miiRRuRumiiiimmmiiuuuRRuRRmmiu
RuuumRmuiRmuRiuiuRRRRmRuRiRRmR
RuuumRmuiRmuRiuiuRRRRmRuRiRRmR
miiRRuRumiiiimmmiiuuu...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
500001 500001
1000000 500001
1000000 1000000
500001 500001
750000 500001
750000 750000
625001 625001
750000 625001
750000 750000
625001 625001
687500 625001
687500 687500
656251 656251
687500 656251
687500 687500
656251 656251
671875 656251
671875 671875
664...

result:

ok 58 points

Test #92:

score: 0
Accepted
time: 0ms
memory: 3592kb

input:

uumuimmRRmmimRmmuuRuiRmuuRiiiu
uumuimmRRmmimRmmuuRuiRmuuRiiii
uumuimmRRmmimRmmuuRuiRmuuRiiiR
uumuimmRRmmimRmmuuRuiRmuuRiiii
uumuimmRRmmimRmmuuRuiRmuuRiiii
uumuimmRRmmimRmmuuRuiRmuuRiiii
uumuimmRRmmimRmmuuRuiRmuuRiiiR
uumuimmRRmmimRmmuuRuiRmuuRiiii
uumuimmRRmmimRmmuuRuiRmuuRiiii
uumuimmRRmmimRmmuuRui...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
0 0
499999 0
499999 499999
0 0
249999 0
249999 249999
0 0
124999 0
124999 124999
0 0
62499 0
62499 62499
0 0
31249 0
31249 31249
0 0
15624 0
15624 15624
0 0
7811 0
7811 7811
0 0
3905 0
3905 3905
0 0
1952 0
1952 1952
0 0
975 0
975 975
0 0
487 0
487 487
0 0
24...

result:

ok 59 points

Test #93:

score: 0
Accepted
time: 3ms
memory: 3524kb

input:

RRmmuiRRRiimmiiuuRuRRmuiRmiRRR
RmRRRRimiiRimRRuumiiimiiimiRum
mRuuiumuiummmiimmuiiRuuiRuRRRi
RmRRRRimiiRimRRuumiiimiiimiRum
mRuuiumuiummmiimmuiiRuuiRuRRRi
mRuuiumuiummmiimmuiiRuuiRuRRRi
RmRRRRimiiRimRRuumiiimiiimiRum
mRuuiumuiummmiimmuiiRuuiRuRRRi
mRuuiumuiummmiimmuiiRuuiRuRRRi
RmRRRRimiiRimRRuumiii...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
500001 500001
1000000 500001
1000000 1000000
750001 750001
1000000 750001
1000000 1000000
875001 875001
1000000 875001
1000000 1000000
937501 937501
1000000 937501
1000000 1000000
968751 968751
1000000 968751
1000000 1000000
984376 984376
1000000 984376
1000...

result:

ok 58 points

Test #94:

score: 0
Accepted
time: 3ms
memory: 3476kb

input:

RummmuRuuRRmiimuiuimiuiuRuuRmi
RummmuRuuRRmiimuiuimiuiuRuuRmu
RummmuRuuRRmiimuiuimiuiuRuuRmm
RummmuRuuRRmiimuiuimiuiuRuuRmu
RummmuRuuRRmiimuiuimiuiuRuuRmu
RummmuRuuRRmiimuiuimiuiuRuuRmm
RummmuRuuRRmiimuiuimiuiuRuuRmm
RummmuRuuRRmiimuiuimiuiuRuuRmu
RummmuRuuRRmiimuiuimiuiuRuuRmm
RummmuRuuRRmiimuiuimi...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
0 500001
499999 500001
499999 1000000
0 750001
249999 750001
249999 1000000
0 875001
124999 875001
124999 1000000
0 937501
62499 937501
62499 1000000
0 968751
31249 968751
31249 1000000
0 984376
15624 984376
15624 1000000
0 992189
7811 992189
7811 1000000
0 ...

result:

ok 58 points

Test #95:

score: 0
Accepted
time: 3ms
memory: 3560kb

input:

RmimRRRmiRRRimimuiRimmmiiRRiiR
uuRiiRmmuuRuuuuiuuuRiiimiuRRim
iumuRmimmRmmmummimRiRuuuimiumi
uuRiiRmmuuRuuuuiuuuRiiimiuRRim
iumuRmimmRmmmummimRiRuuuimiumi
uuRiiRmmuuRuuuuiuuuRiiimiuRRim
iumuRmimmRmmmummimRiRuuuimiumi
iumuRmimmRmmmummimRiRuuuimiumi
uuRiiRmmuuRuuuuiuuuRiiimiuRRim
iumuRmimmRmmmummimRiR...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
500001 0
1000000 0
1000000 499999
750001 0
1000000 0
1000000 249999
875001 0
1000000 0
1000000 124999
937501 0
1000000 0
1000000 62499
968751 0
1000000 0
1000000 31249
984376 0
1000000 0
1000000 15624
992189 0
1000000 0
1000000 7811
996095 0
1000000 0
100000...

result:

ok 59 points

Test #96:

score: 0
Accepted
time: 4ms
memory: 3580kb

input:

iiiimRuiuuiuiuiiRRRumiiRiRiiii
iiiimRuiuuiuiuiiRRRumiiRiRiiim
iiiimRuiuuiuiuiiRRRumiiRiRiiiu
iiiimRuiuuiuiuiiRRRumiiRiRiiim
iiiimRuiuuiuiuiiRRRumiiRiRiiim
iiiimRuiuuiuiuiiRRRumiiRiRiiim
iiiimRuiuuiuiuiiRRRumiiRiRiiiu
iiiimRuiuuiuiuiiRRRumiiRiRiiiu
iiiimRuiuuiuiuiiRRRumiiRiRiiiu
iiiimRuiuuiuiuiiRRRum...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
0 0
499999 0
499999 499999
250000 250000
499999 250000
499999 499999
250000 250000
374999 250000
374999 374999
312500 312500
374999 312500
374999 374999
312500 312500
343749 312500
343749 343749
328125 328125
343749 328125
343749 343749
328125 328125
335936 ...

result:

ok 55 points

Test #97:

score: 0
Accepted
time: 3ms
memory: 3468kb

input:

uumRumimumRmmummiRimiiRuiRmRRi
mumiRumuRRumimmmmRmRiuRumimRRu
mmRumRiiuiRRmiRiiRuummumRiiiRR
mumiRumuRRumimmmmRmRiuRumimRRu
mmRumRiiuiRRmiRiiRuummumRiiiRR
mmRumRiiuiRRmiRiiRuummumRiiiRR
mmRumRiiuiRRmiRiiRuummumRiiiRR
mumiRumuRRumimmmmRmRiuRumimRRu
mumiRumuRRumimmmmRmRiuRumimRRu
mmRumRiiuiRRmiRiiRuum...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
500001 500001
1000000 500001
1000000 1000000
500001 500001
750000 500001
750000 750000
625001 625001
750000 625001
750000 750000
625001 625001
687500 625001
687500 687500
656251 656251
687500 656251
687500 687500
656251 656251
671875 656251
671875 671875
664...

result:

ok 58 points

Test #98:

score: 0
Accepted
time: 3ms
memory: 3560kb

input:

RiiiumiuRuuummiRmuuRmumRRiiimm
RiiiumiuRuuummiRmuuRmumRRiiimi
RiiiumiuRuuummiRmuuRmumRRiiimR
RiiiumiuRuuummiRmuuRmumRRiiimi
RiiiumiuRuuummiRmuuRmumRRiiimi
RiiiumiuRuuummiRmuuRmumRRiiimi
RiiiumiuRuuummiRmuuRmumRRiiimR
RiiiumiuRuuummiRmuuRmumRRiiimi
RiiiumiuRuuummiRmuuRmumRRiiimi
RiiiumiuRuuummiRmuuRm...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
0 0
499999 0
499999 499999
0 0
249999 0
249999 249999
0 0
124999 0
124999 124999
0 0
62499 0
62499 62499
0 0
31249 0
31249 31249
0 0
15624 0
15624 15624
0 0
7811 0
7811 7811
0 0
3905 0
3905 3905
0 0
1952 0
1952 1952
0 0
975 0
975 975
0 0
487 0
487 487
0 0
24...

result:

ok 58 points

Test #99:

score: 0
Accepted
time: 1ms
memory: 3524kb

input:

uiimuiuumRRmmuuRRiimmRumimRimi
imummuiRRRiRmmuiuRRmRuRRuRuiRu
mmRumumRmRummiRmimimiRumiumRmR
imummuiRRRiRmmuiuRRmRuRRuRuiRu
mmRumumRmRummiRmimimiRumiumRmR
mmRumumRmRummiRmimimiRumiumRmR
imummuiRRRiRmmuiuRRmRuRRuRuiRu
mmRumumRmRummiRmimimiRumiumRmR
mmRumumRmRummiRmimimiRumiumRmR
imummuiRRRiRmmuiuRRmR...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
500001 500001
1000000 500001
1000000 1000000
750001 750001
1000000 750001
1000000 1000000
875001 875001
1000000 875001
1000000 1000000
937501 937501
1000000 937501
1000000 1000000
968751 968751
1000000 968751
1000000 1000000
984376 984376
1000000 984376
1000...

result:

ok 58 points

Test #100:

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

input:

iRRuiuRiumuuiumuiiiiuumuuRmiiR
iRRuiuRiumuuiumuiiiiuumuuRmiim
iRRuiuRiumuuiumuiiiiuumuuRmiiu
iRRuiuRiumuuiumuiiiiuumuuRmiim
iRRuiuRiumuuiumuiiiiuumuuRmiim
iRRuiuRiumuuiumuiiiiuumuuRmiiu
iRRuiuRiumuuiumuiiiiuumuuRmiiu
iRRuiuRiumuuiumuiiiiuumuuRmiim
iRRuiuRiumuuiumuiiiiuumuuRmiiu
iRRuiuRiumuuiumuiiiiu...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
0 500001
499999 500001
499999 1000000
0 750001
249999 750001
249999 1000000
0 875001
124999 875001
124999 1000000
0 937501
62499 937501
62499 1000000
0 968751
31249 968751
31249 1000000
0 984376
15624 984376
15624 1000000
0 992189
7811 992189
7811 1000000
0 ...

result:

ok 58 points

Test #101:

score: 0
Accepted
time: 0ms
memory: 3556kb

input:

imuRiiimuimmimiuimmRmmiummRmmR
muiRRuRmuuRuuRRRiRRimmmRiiuRui
miiRmmmiRiimuRRuumuuRmumumRiim
muiRRuRmuuRuuRRRiRRimmmRiiuRui
miiRmmmiRiimuRRuumuuRmumumRiim
muiRRuRmuuRuuRRRiRRimmmRiiuRui
miiRmmmiRiimuRRuumuuRmumumRiim
miiRmmmiRiimuRRuumuuRmumumRiim
muiRRuRmuuRuuRRRiRRimmmRiiuRui
miiRmmmiRiimuRRuumuuR...

output:

1 0
0 0
0 1
0 0
1000000 0
1000000 1000000
500001 0
1000000 0
1000000 499999
750001 0
1000000 0
1000000 249999
875001 0
1000000 0
1000000 124999
937501 0
1000000 0
1000000 62499
968751 0
1000000 0
1000000 31249
984376 0
1000000 0
1000000 15624
992189 0
1000000 0
1000000 7811
996095 0
1000000 0
100000...

result:

ok 58 points