QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#869495#8615. Equal Stringsucup-team896#AC ✓23ms9556kbC++201.5kb2025-01-25 10:22:482025-01-25 10:22:48

Judging History

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

  • [2025-01-25 10:22:48]
  • 评测
  • 测评结果:AC
  • 用时:23ms
  • 内存:9556kb
  • [2025-01-25 10:22:48]
  • 提交

answer

#include <bits/stdc++.h>

#define rep(i, j, k) for (int i = (j); i <= (k); ++i)
#define per(i, j, k) for (int i = (j); i >= (k); --i)
#define SZ(v) int((v).size())
#define ALL(v) (v).begin(),(v).end()
#define fi first
#define se second
using ll = long long;
using pii = std::pair<int, int>;
using pll = std::pair<ll, ll>;

template<class T> void chkmn(T &x, T y) { if (y < x) x = y; }
template<class T> void chkmx(T &x, T y) { if (y > x) x = y; }

using namespace std;

const int maxn = 1010;
mt19937 rnd(random_device{}());

int n, m = 50, qcnt, a[maxn][maxn], val[maxn][maxn], p[maxn];

int ask(int x, int y) {
  qcnt++;
  cout << x << " " << y << endl;
  int res;
  cin >> res;
  if (!res) exit(0);
  return res;
  // int res = 0;
  // rep (i, 1, m) if (a[x][i] != a[y][i]) res++;
  // return res;
}

void report(int x, int y) {
  // cout << "! " << x << " " << y << endl;
  // cout << "Used " << qcnt << endl;
  exit(0);
}

int main() {
  cin >> n;
  rep (i, 1, n - 1) rep (j, 1, m) a[i][j] = rnd() & 1;
  rep (i, 1, m) a[n][i] = a[n - 1][i];
  rep (i, 1, n) p[i] = i;
  shuffle(p + 1, p + n + 1, rnd);
  int d = min(n, 10);
  rep (i, 1, d) {
    rep (j, 1, n) if (p[i] != j) val[i][j] = ask(p[i], j);
  }
  rep (i, 1, d) rep (j, 1, n) if (p[i] != j && !val[i][j]) report(p[i], j);
  rep (i, 1, n) rep (j, i + 1, n) {
    int ok = 1;
    rep (k, 1, d) if (val[k][i] != val[k][j]) ok = 0;
    if (ok && !ask(i, j)) report(i, j);
  }
  assert(0);
}

这程序好像有点Bug,我给组数据试试?

详细

Test #1:

score: 100
Accepted
time: 1ms
memory: 5576kb

input:

4
21
23
0

output:

2 1
2 3
2 4

result:

ok Found equal strings: 2, 4

Test #2:

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

input:

4
0

output:

3 1

result:

ok Found equal strings: 3, 1

Test #3:

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

input:

10
23
29
19
26
26
18
30
29
21
23
24
24
21
25
29
25
24
28
24
29
26
25
29
27
27
0

output:

2 1
2 3
2 4
2 5
2 6
2 7
2 8
2 9
2 10
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
1 10
3 1
3 2
3 4
3 5
3 6
3 7
3 8
3 9

result:

ok Found equal strings: 3, 9

Test #4:

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

input:

100
22
25
25
33
21
26
27
22
23
24
31
22
20
23
26
31
31
27
30
28
23
25
30
20
24
31
24
27
31
26
22
33
23
25
21
25
29
23
26
23
21
21
24
22
31
27
25
28
26
21
24
22
23
21
28
19
21
27
24
28
33
32
29
22
31
25
24
27
26
27
20
32
29
24
21
21
22
26
28
24
28
30
21
29
22
24
30
20
28
27
22
23
19
23
16
17
30
25
33...

output:

4 1
4 2
4 3
4 5
4 6
4 7
4 8
4 9
4 10
4 11
4 12
4 13
4 14
4 15
4 16
4 17
4 18
4 19
4 20
4 21
4 22
4 23
4 24
4 25
4 26
4 27
4 28
4 29
4 30
4 31
4 32
4 33
4 34
4 35
4 36
4 37
4 38
4 39
4 40
4 41
4 42
4 43
4 44
4 45
4 46
4 47
4 48
4 49
4 50
4 51
4 52
4 53
4 54
4 55
4 56
4 57
4 58
4 59
4 60
4 61
4 62
4 6...

result:

ok Found equal strings: 62, 100

Test #5:

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

input:

500
26
31
24
23
27
22
32
23
30
21
18
28
31
20
29
22
24
29
27
31
19
24
23
26
29
22
26
19
33
26
23
26
26
21
23
29
29
26
20
23
28
26
24
29
27
28
22
22
25
32
23
25
28
22
25
19
21
25
27
29
29
25
24
24
26
26
28
24
33
26
23
25
24
21
27
25
28
27
21
28
28
32
30
28
22
23
27
22
27
22
23
27
26
23
24
26
29
20
27...

output:

117 1
117 2
117 3
117 4
117 5
117 6
117 7
117 8
117 9
117 10
117 11
117 12
117 13
117 14
117 15
117 16
117 17
117 18
117 19
117 20
117 21
117 22
117 23
117 24
117 25
117 26
117 27
117 28
117 29
117 30
117 31
117 32
117 33
117 34
117 35
117 36
117 37
117 38
117 39
117 40
117 41
117 42
117 43
117 44
1...

result:

ok Found equal strings: 100, 334

Test #6:

score: 0
Accepted
time: 14ms
memory: 8020kb

input:

750
27
20
26
18
28
31
28
21
23
28
28
25
22
24
23
19
23
23
25
26
30
23
26
19
30
22
21
31
24
27
27
23
23
28
21
25
22
20
21
20
27
23
20
19
27
21
25
25
21
21
27
22
21
25
35
28
23
20
29
28
24
24
30
19
25
23
27
20
25
29
25
24
25
27
26
24
29
22
31
29
21
22
25
28
26
23
28
31
18
28
28
24
27
17
25
25
23
25
19...

output:

559 1
559 2
559 3
559 4
559 5
559 6
559 7
559 8
559 9
559 10
559 11
559 12
559 13
559 14
559 15
559 16
559 17
559 18
559 19
559 20
559 21
559 22
559 23
559 24
559 25
559 26
559 27
559 28
559 29
559 30
559 31
559 32
559 33
559 34
559 35
559 36
559 37
559 38
559 39
559 40
559 41
559 42
559 43
559 44
5...

result:

ok Found equal strings: 130, 698

Test #7:

score: 0
Accepted
time: 15ms
memory: 8656kb

input:

999
24
23
26
22
24
21
25
26
27
21
30
22
21
22
27
26
35
27
26
28
26
24
29
22
24
28
22
27
20
33
27
28
30
34
26
22
22
22
30
23
21
23
22
25
27
26
22
23
24
23
23
29
32
28
24
29
23
22
22
25
28
20
25
23
28
21
20
24
24
22
30
20
28
26
25
25
28
31
30
23
18
26
27
31
20
29
30
30
32
27
16
23
31
20
24
26
22
23
33...

output:

883 1
883 2
883 3
883 4
883 5
883 6
883 7
883 8
883 9
883 10
883 11
883 12
883 13
883 14
883 15
883 16
883 17
883 18
883 19
883 20
883 21
883 22
883 23
883 24
883 25
883 26
883 27
883 28
883 29
883 30
883 31
883 32
883 33
883 34
883 35
883 36
883 37
883 38
883 39
883 40
883 41
883 42
883 43
883 44
8...

result:

ok Found equal strings: 205, 281

Test #8:

score: 0
Accepted
time: 14ms
memory: 9044kb

input:

1000
21
24
25
25
25
21
28
19
27
25
24
27
18
30
19
24
30
23
21
26
29
24
25
29
22
24
23
28
26
23
27
24
29
22
21
25
25
25
24
26
24
29
27
20
21
22
21
20
22
22
25
28
24
26
25
28
25
24
24
21
24
24
23
24
24
21
23
32
29
27
24
25
27
26
20
26
25
19
24
26
37
20
23
24
20
22
21
22
26
32
22
21
26
27
32
22
29
23
2...

output:

453 1
453 2
453 3
453 4
453 5
453 6
453 7
453 8
453 9
453 10
453 11
453 12
453 13
453 14
453 15
453 16
453 17
453 18
453 19
453 20
453 21
453 22
453 23
453 24
453 25
453 26
453 27
453 28
453 29
453 30
453 31
453 32
453 33
453 34
453 35
453 36
453 37
453 38
453 39
453 40
453 41
453 42
453 43
453 44
4...

result:

ok Found equal strings: 211, 327

Test #9:

score: 0
Accepted
time: 17ms
memory: 8192kb

input:

1000
24
22
27
25
26
21
24
23
23
23
22
23
21
23
28
23
21
23
24
25
27
25
30
28
21
24
24
20
22
21
22
25
24
22
24
33
26
18
24
25
26
23
22
26
32
31
28
20
26
23
21
24
24
30
24
24
21
22
27
26
22
18
22
13
27
21
28
21
26
31
28
24
21
30
20
22
17
22
21
16
24
18
26
27
23
24
24
26
28
31
27
27
30
16
22
27
24
27
2...

output:

104 1
104 2
104 3
104 4
104 5
104 6
104 7
104 8
104 9
104 10
104 11
104 12
104 13
104 14
104 15
104 16
104 17
104 18
104 19
104 20
104 21
104 22
104 23
104 24
104 25
104 26
104 27
104 28
104 29
104 30
104 31
104 32
104 33
104 34
104 35
104 36
104 37
104 38
104 39
104 40
104 41
104 42
104 43
104 44
1...

result:

ok Found equal strings: 220, 448

Test #10:

score: 0
Accepted
time: 22ms
memory: 8152kb

input:

1000
25
20
18
23
25
29
26
25
25
26
21
30
26
20
17
21
26
28
18
21
21
27
26
23
27
23
29
24
33
28
22
22
25
22
28
26
24
24
24
27
31
31
21
28
32
23
27
24
32
24
19
26
23
34
30
26
30
32
30
25
34
27
20
19
26
26
24
20
28
26
22
29
25
26
19
28
21
22
15
24
26
28
27
30
32
26
27
27
24
23
26
28
21
33
21
25
25
19
2...

output:

780 1
780 2
780 3
780 4
780 5
780 6
780 7
780 8
780 9
780 10
780 11
780 12
780 13
780 14
780 15
780 16
780 17
780 18
780 19
780 20
780 21
780 22
780 23
780 24
780 25
780 26
780 27
780 28
780 29
780 30
780 31
780 32
780 33
780 34
780 35
780 36
780 37
780 38
780 39
780 40
780 41
780 42
780 43
780 44
7...

result:

ok Found equal strings: 279, 970

Test #11:

score: 0
Accepted
time: 14ms
memory: 8396kb

input:

1000
24
22
24
22
28
23
22
27
18
23
20
31
23
29
33
24
23
24
30
24
26
26
21
28
25
35
20
18
19
19
24
30
19
26
28
29
22
32
28
30
30
30
22
24
30
25
25
23
30
24
27
21
24
24
19
20
24
23
21
25
22
24
23
31
31
28
24
27
21
25
22
19
22
23
26
24
26
27
25
25
19
25
24
24
32
24
21
28
37
23
25
26
26
31
25
25
29
26
2...

output:

539 1
539 2
539 3
539 4
539 5
539 6
539 7
539 8
539 9
539 10
539 11
539 12
539 13
539 14
539 15
539 16
539 17
539 18
539 19
539 20
539 21
539 22
539 23
539 24
539 25
539 26
539 27
539 28
539 29
539 30
539 31
539 32
539 33
539 34
539 35
539 36
539 37
539 38
539 39
539 40
539 41
539 42
539 43
539 44
5...

result:

ok Found equal strings: 619, 843

Test #12:

score: 0
Accepted
time: 19ms
memory: 8660kb

input:

1000
21
24
24
30
26
26
25
27
22
24
24
20
22
25
25
27
20
25
24
21
27
28
28
23
24
27
23
28
21
32
22
28
27
26
22
20
27
23
24
30
22
22
20
24
33
23
25
29
25
27
27
21
22
17
29
21
26
23
18
27
23
21
22
27
23
29
19
28
29
26
28
31
21
24
28
25
24
23
26
27
24
26
30
30
28
24
25
30
26
17
21
27
20
21
31
22
21
19
2...

output:

569 1
569 2
569 3
569 4
569 5
569 6
569 7
569 8
569 9
569 10
569 11
569 12
569 13
569 14
569 15
569 16
569 17
569 18
569 19
569 20
569 21
569 22
569 23
569 24
569 25
569 26
569 27
569 28
569 29
569 30
569 31
569 32
569 33
569 34
569 35
569 36
569 37
569 38
569 39
569 40
569 41
569 42
569 43
569 44
5...

result:

ok Found equal strings: 678, 717

Test #13:

score: 0
Accepted
time: 15ms
memory: 8280kb

input:

1000
33
30
22
25
20
33
30
24
24
27
28
27
26
23
20
28
30
18
26
28
28
26
27
23
24
22
20
22
26
26
24
26
25
26
26
28
27
26
25
26
25
25
25
24
22
23
21
31
25
25
20
24
31
22
23
26
26
23
26
28
25
26
24
27
22
23
30
26
31
23
28
25
26
23
25
24
19
28
15
27
20
26
25
19
25
25
27
22
22
23
26
23
23
26
24
27
30
17
2...

output:

417 1
417 2
417 3
417 4
417 5
417 6
417 7
417 8
417 9
417 10
417 11
417 12
417 13
417 14
417 15
417 16
417 17
417 18
417 19
417 20
417 21
417 22
417 23
417 24
417 25
417 26
417 27
417 28
417 29
417 30
417 31
417 32
417 33
417 34
417 35
417 36
417 37
417 38
417 39
417 40
417 41
417 42
417 43
417 44
4...

result:

ok Found equal strings: 239, 737

Test #14:

score: 0
Accepted
time: 21ms
memory: 8152kb

input:

1000
27
29
29
26
26
32
25
30
23
25
24
27
27
17
22
27
26
22
27
18
31
18
26
15
30
29
21
29
29
21
32
18
29
23
28
26
24
27
18
24
26
24
25
28
22
22
25
28
26
24
22
23
22
24
19
24
34
29
26
28
26
31
26
27
21
25
26
21
32
26
23
29
26
26
23
25
22
27
27
27
27
19
28
25
20
24
23
29
21
23
24
31
18
22
22
31
21
29
2...

output:

347 1
347 2
347 3
347 4
347 5
347 6
347 7
347 8
347 9
347 10
347 11
347 12
347 13
347 14
347 15
347 16
347 17
347 18
347 19
347 20
347 21
347 22
347 23
347 24
347 25
347 26
347 27
347 28
347 29
347 30
347 31
347 32
347 33
347 34
347 35
347 36
347 37
347 38
347 39
347 40
347 41
347 42
347 43
347 44
3...

result:

ok Found equal strings: 112, 796

Test #15:

score: 0
Accepted
time: 21ms
memory: 8148kb

input:

1000
29
27
28
19
24
28
23
22
22
27
22
25
26
25
19
19
31
29
30
29
22
23
19
23
26
28
31
22
21
27
21
23
29
25
27
20
23
31
26
23
22
25
28
33
22
20
29
27
26
23
25
21
26
24
21
26
30
22
31
19
19
21
30
25
21
26
17
29
18
22
32
17
27
28
27
24
29
22
29
28
30
32
28
24
19
21
24
21
22
25
31
22
30
28
28
26
25
20
2...

output:

332 1
332 2
332 3
332 4
332 5
332 6
332 7
332 8
332 9
332 10
332 11
332 12
332 13
332 14
332 15
332 16
332 17
332 18
332 19
332 20
332 21
332 22
332 23
332 24
332 25
332 26
332 27
332 28
332 29
332 30
332 31
332 32
332 33
332 34
332 35
332 36
332 37
332 38
332 39
332 40
332 41
332 42
332 43
332 44
3...

result:

ok Found equal strings: 634, 855

Test #16:

score: 0
Accepted
time: 15ms
memory: 8792kb

input:

1000
28
27
21
24
22
27
24
23
23
28
30
23
26
30
24
26
25
14
25
29
27
24
24
31
27
27
26
28
27
27
25
27
24
27
28
19
26
26
23
28
22
24
26
26
24
20
27
29
28
23
26
27
22
29
26
26
24
28
23
28
25
24
30
23
23
23
21
24
27
20
21
25
25
26
28
26
25
20
29
28
25
22
20
18
25
23
24
27
29
28
26
23
28
20
27
21
18
27
1...

output:

573 1
573 2
573 3
573 4
573 5
573 6
573 7
573 8
573 9
573 10
573 11
573 12
573 13
573 14
573 15
573 16
573 17
573 18
573 19
573 20
573 21
573 22
573 23
573 24
573 25
573 26
573 27
573 28
573 29
573 30
573 31
573 32
573 33
573 34
573 35
573 36
573 37
573 38
573 39
573 40
573 41
573 42
573 43
573 44
5...

result:

ok Found equal strings: 196, 508

Test #17:

score: 0
Accepted
time: 17ms
memory: 8020kb

input:

1000
29
17
24
23
24
28
30
24
31
26
29
21
20
26
27
26
25
21
26
20
24
26
29
23
25
22
26
29
19
28
28
24
25
28
25
28
33
19
29
30
25
26
23
27
29
21
25
25
30
24
27
26
20
23
24
18
24
23
22
23
23
22
31
16
23
22
28
23
31
23
30
26
19
21
23
23
21
27
25
24
32
20
26
22
21
27
23
27
25
26
23
25
33
22
25
22
26
27
2...

output:

817 1
817 2
817 3
817 4
817 5
817 6
817 7
817 8
817 9
817 10
817 11
817 12
817 13
817 14
817 15
817 16
817 17
817 18
817 19
817 20
817 21
817 22
817 23
817 24
817 25
817 26
817 27
817 28
817 29
817 30
817 31
817 32
817 33
817 34
817 35
817 36
817 37
817 38
817 39
817 40
817 41
817 42
817 43
817 44
8...

result:

ok Found equal strings: 30, 255

Test #18:

score: 0
Accepted
time: 17ms
memory: 7896kb

input:

1000
20
18
29
33
26
28
26
22
24
23
24
30
22
24
22
25
28
26
25
31
18
28
24
23
21
24
22
23
20
27
32
28
21
22
25
25
24
27
32
27
25
28
25
32
29
22
25
32
28
25
20
25
21
32
19
22
25
27
27
23
24
25
19
31
24
28
23
27
28
29
27
24
23
22
25
24
28
28
25
25
22
25
25
30
28
18
21
26
29
13
24
31
15
30
26
22
23
22
3...

output:

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

result:

ok Found equal strings: 284, 957

Test #19:

score: 0
Accepted
time: 17ms
memory: 8276kb

input:

1000
26
24
25
24
19
32
24
23
28
26
28
20
22
27
17
25
22
31
29
31
19
30
20
26
23
23
22
26
20
27
29
16
20
20
27
24
24
29
25
27
22
20
27
23
22
27
24
25
28
26
35
23
24
28
26
24
23
25
31
24
25
27
28
26
29
28
28
30
26
25
21
25
22
26
21
25
26
23
21
32
23
22
21
26
30
26
28
26
22
29
21
32
24
28
24
28
24
19
2...

output:

587 1
587 2
587 3
587 4
587 5
587 6
587 7
587 8
587 9
587 10
587 11
587 12
587 13
587 14
587 15
587 16
587 17
587 18
587 19
587 20
587 21
587 22
587 23
587 24
587 25
587 26
587 27
587 28
587 29
587 30
587 31
587 32
587 33
587 34
587 35
587 36
587 37
587 38
587 39
587 40
587 41
587 42
587 43
587 44
5...

result:

ok Found equal strings: 343, 478

Test #20:

score: 0
Accepted
time: 11ms
memory: 7888kb

input:

1000
25
26
29
28
32
21
22
22
23
23
31
32
23
26
27
30
19
23
24
23
21
24
24
27
24
21
29
31
27
27
27
25
29
23
29
24
24
28
26
27
25
24
24
31
28
27
22
22
20
27
24
26
19
25
27
20
27
23
33
28
26
28
24
26
24
29
26
21
32
20
24
25
27
29
22
29
26
26
25
26
29
20
17
23
18
30
25
20
26
32
19
23
22
23
24
29
24
26
2...

output:

713 1
713 2
713 3
713 4
713 5
713 6
713 7
713 8
713 9
713 10
713 11
713 12
713 13
713 14
713 15
713 16
713 17
713 18
713 19
713 20
713 21
713 22
713 23
713 24
713 25
713 26
713 27
713 28
713 29
713 30
713 31
713 32
713 33
713 34
713 35
713 36
713 37
713 38
713 39
713 40
713 41
713 42
713 43
713 44
7...

result:

ok Found equal strings: 352, 402

Test #21:

score: 0
Accepted
time: 23ms
memory: 7760kb

input:

1000
30
25
24
26
24
26
27
19
24
31
23
29
27
22
23
22
29
23
27
19
26
26
26
25
24
23
22
33
28
16
21
25
22
27
26
26
26
26
25
26
26
23
26
26
20
27
29
19
30
32
26
22
21
31
24
25
24
21
29
25
23
21
24
27
22
25
22
24
30
23
20
25
25
20
23
31
22
24
31
26
31
28
23
30
29
22
24
30
24
22
21
28
18
28
22
34
30
30
2...

output:

714 1
714 2
714 3
714 4
714 5
714 6
714 7
714 8
714 9
714 10
714 11
714 12
714 13
714 14
714 15
714 16
714 17
714 18
714 19
714 20
714 21
714 22
714 23
714 24
714 25
714 26
714 27
714 28
714 29
714 30
714 31
714 32
714 33
714 34
714 35
714 36
714 37
714 38
714 39
714 40
714 41
714 42
714 43
714 44
7...

result:

ok Found equal strings: 462, 874

Test #22:

score: 0
Accepted
time: 17ms
memory: 8272kb

input:

1000
29
20
31
23
24
25
23
22
21
25
31
28
24
26
20
26
30
26
17
30
23
26
25
25
32
18
28
19
31
26
20
21
19
21
26
25
26
22
25
21
22
25
27
30
19
21
28
25
29
21
30
22
27
29
32
24
28
27
22
27
28
26
25
24
24
27
31
32
25
20
26
19
26
26
22
24
27
25
25
25
22
27
25
24
33
33
25
15
25
20
23
24
26
23
27
27
21
27
2...

output:

831 1
831 2
831 3
831 4
831 5
831 6
831 7
831 8
831 9
831 10
831 11
831 12
831 13
831 14
831 15
831 16
831 17
831 18
831 19
831 20
831 21
831 22
831 23
831 24
831 25
831 26
831 27
831 28
831 29
831 30
831 31
831 32
831 33
831 34
831 35
831 36
831 37
831 38
831 39
831 40
831 41
831 42
831 43
831 44
8...

result:

ok Found equal strings: 521, 747

Test #23:

score: 0
Accepted
time: 23ms
memory: 8660kb

input:

1000
22
26
24
23
25
31
24
29
27
26
32
26
21
30
23
26
20
20
25
30
27
22
28
25
21
23
28
26
26
27
23
25
19
23
24
26
33
24
23
21
29
25
26
29
21
25
28
23
25
23
29
26
31
26
20
22
29
27
26
24
31
27
22
24
25
24
21
22
33
29
33
31
27
27
21
25
20
29
25
29
18
20
25
27
25
33
24
22
30
28
24
26
20
25
23
25
26
25
2...

output:

468 1
468 2
468 3
468 4
468 5
468 6
468 7
468 8
468 9
468 10
468 11
468 12
468 13
468 14
468 15
468 16
468 17
468 18
468 19
468 20
468 21
468 22
468 23
468 24
468 25
468 26
468 27
468 28
468 29
468 30
468 31
468 32
468 33
468 34
468 35
468 36
468 37
468 38
468 39
468 40
468 41
468 42
468 43
468 44
4...

result:

ok Found equal strings: 621, 861

Test #24:

score: 0
Accepted
time: 11ms
memory: 8276kb

input:

1000
22
25
21
24
23
25
15
22
21
23
33
21
18
26
27
22
23
23
30
27
24
26
30
23
29
27
23
22
28
28
24
22
26
26
28
28
25
29
21
21
27
26
29
28
28
23
26
31
25
29
21
31
25
27
26
18
20
19
25
17
28
25
24
27
26
25
24
19
19
21
18
25
21
20
23
28
18
23
26
25
29
30
23
23
23
25
25
26
21
29
27
24
23
25
23
26
33
24
2...

output:

777 1
777 2
777 3
777 4
777 5
777 6
777 7
777 8
777 9
777 10
777 11
777 12
777 13
777 14
777 15
777 16
777 17
777 18
777 19
777 20
777 21
777 22
777 23
777 24
777 25
777 26
777 27
777 28
777 29
777 30
777 31
777 32
777 33
777 34
777 35
777 36
777 37
777 38
777 39
777 40
777 41
777 42
777 43
777 44
7...

result:

ok Found equal strings: 143, 920

Test #25:

score: 0
Accepted
time: 13ms
memory: 8276kb

input:

1000
29
25
27
22
24
20
17
20
22
27
26
23
23
27
30
25
23
26
27
29
23
31
24
24
26
27
21
27
21
25
26
22
33
25
27
27
30
23
25
28
25
21
18
22
25
20
24
31
27
32
25
27
28
23
28
30
21
23
23
19
27
22
33
27
22
22
22
27
22
23
28
21
22
28
29
27
25
25
29
28
29
15
28
25
29
26
24
23
25
26
23
25
27
25
25
25
28
21
2...

output:

712 1
712 2
712 3
712 4
712 5
712 6
712 7
712 8
712 9
712 10
712 11
712 12
712 13
712 14
712 15
712 16
712 17
712 18
712 19
712 20
712 21
712 22
712 23
712 24
712 25
712 26
712 27
712 28
712 29
712 30
712 31
712 32
712 33
712 34
712 35
712 36
712 37
712 38
712 39
712 40
712 41
712 42
712 43
712 44
7...

result:

ok Found equal strings: 17, 979

Test #26:

score: 0
Accepted
time: 15ms
memory: 8148kb

input:

1000
26
25
23
22
20
25
18
26
23
21
19
21
25
30
28
22
26
25
29
24
26
15
26
19
22
25
18
30
23
25
24
28
25
32
26
26
31
25
27
28
29
15
26
20
23
21
26
26
29
27
26
23
28
23
29
25
27
34
26
21
31
27
23
30
23
20
30
29
23
23
21
24
22
26
26
24
22
24
28
22
25
20
17
18
27
28
25
24
24
29
21
27
30
22
21
29
23
25
1...

output:

414 1
414 2
414 3
414 4
414 5
414 6
414 7
414 8
414 9
414 10
414 11
414 12
414 13
414 14
414 15
414 16
414 17
414 18
414 19
414 20
414 21
414 22
414 23
414 24
414 25
414 26
414 27
414 28
414 29
414 30
414 31
414 32
414 33
414 34
414 35
414 36
414 37
414 38
414 39
414 40
414 41
414 42
414 43
414 44
4...

result:

ok Found equal strings: 39, 538

Test #27:

score: 0
Accepted
time: 13ms
memory: 9300kb

input:

1000
28
22
25
23
15
28
28
21
24
25
23
29
25
21
26
21
27
22
24
29
22
21
27
28
24
28
19
30
27
21
22
17
30
27
29
29
26
27
27
31
25
24
24
32
28
32
23
27
23
29
30
30
32
23
25
20
25
26
24
29
25
28
25
20
22
23
25
20
21
21
28
22
25
25
23
27
27
19
23
24
25
26
26
22
28
23
23
25
23
27
26
19
31
30
28
24
27
26
1...

output:

415 1
415 2
415 3
415 4
415 5
415 6
415 7
415 8
415 9
415 10
415 11
415 12
415 13
415 14
415 15
415 16
415 17
415 18
415 19
415 20
415 21
415 22
415 23
415 24
415 25
415 26
415 27
415 28
415 29
415 30
415 31
415 32
415 33
415 34
415 35
415 36
415 37
415 38
415 39
415 40
415 41
415 42
415 43
415 44
4...

result:

ok Found equal strings: 98, 412

Test #28:

score: 0
Accepted
time: 19ms
memory: 7680kb

input:

1000
24
20
22
18
18
20
21
25
24
25
32
26
23
27
19
29
26
28
26
24
26
23
26
26
23
27
34
24
18
24
23
25
22
25
26
30
26
23
23
23
29
25
22
27
25
24
22
20
27
25
26
29
25
25
24
26
27
25
21
22
25
26
32
22
21
16
25
28
29
26
23
29
28
26
28
29
24
25
26
23
25
24
21
19
24
26
23
27
25
32
25
23
22
25
25
26
27
28
2...

output:

836 1
836 2
836 3
836 4
836 5
836 6
836 7
836 8
836 9
836 10
836 11
836 12
836 13
836 14
836 15
836 16
836 17
836 18
836 19
836 20
836 21
836 22
836 23
836 24
836 25
836 26
836 27
836 28
836 29
836 30
836 31
836 32
836 33
836 34
836 35
836 36
836 37
836 38
836 39
836 40
836 41
836 42
836 43
836 44
8...

result:

ok Found equal strings: 598, 970

Test #29:

score: 0
Accepted
time: 16ms
memory: 8448kb

input:

1000
25
23
32
18
27
25
33
26
27
20
23
24
23
28
29
24
29
24
25
26
23
23
26
31
27
22
22
31
26
26
26
25
21
19
24
16
22
26
31
19
18
27
25
26
26
28
27
21
22
24
24
24
26
25
23
30
28
23
22
19
28
18
25
19
24
24
26
32
27
20
30
24
26
25
26
30
28
19
25
20
31
29
28
29
18
26
32
26
22
23
26
29
19
12
28
28
25
19
2...

output:

988 1
988 2
988 3
988 4
988 5
988 6
988 7
988 8
988 9
988 10
988 11
988 12
988 13
988 14
988 15
988 16
988 17
988 18
988 19
988 20
988 21
988 22
988 23
988 24
988 25
988 26
988 27
988 28
988 29
988 30
988 31
988 32
988 33
988 34
988 35
988 36
988 37
988 38
988 39
988 40
988 41
988 42
988 43
988 44
9...

result:

ok Found equal strings: 657, 844

Test #30:

score: 0
Accepted
time: 23ms
memory: 7424kb

input:

1000
27
25
18
18
26
24
28
27
32
23
20
23
23
23
24
19
29
28
26
23
27
24
18
29
18
24
25
24
28
29
27
25
25
27
30
25
29
25
20
25
17
30
27
19
30
26
19
23
21
25
26
25
21
30
22
27
22
25
23
26
25
20
23
20
27
23
28
25
32
27
24
18
24
27
29
23
26
21
30
21
26
27
23
29
33
17
30
31
24
24
23
30
29
24
24
29
28
31
3...

output:

274 1
274 2
274 3
274 4
274 5
274 6
274 7
274 8
274 9
274 10
274 11
274 12
274 13
274 14
274 15
274 16
274 17
274 18
274 19
274 20
274 21
274 22
274 23
274 24
274 25
274 26
274 27
274 28
274 29
274 30
274 31
274 32
274 33
274 34
274 35
274 36
274 37
274 38
274 39
274 40
274 41
274 42
274 43
274 44
2...

result:

ok Found equal strings: 716, 718

Test #31:

score: 0
Accepted
time: 15ms
memory: 9556kb

input:

1000
27
27
30
26
21
29
28
23
23
30
26
23
26
24
17
28
26
24
21
26
34
22
27
30
24
19
29
28
30
23
26
17
21
24
26
25
24
25
25
24
26
26
25
31
28
24
25
23
25
24
30
19
20
25
23
31
32
35
31
24
24
29
25
25
25
32
27
24
30
24
29
24
21
28
27
23
24
22
21
29
23
33
24
22
24
26
32
24
29
27
25
32
27
27
28
29
23
32
2...

output:

904 1
904 2
904 3
904 4
904 5
904 6
904 7
904 8
904 9
904 10
904 11
904 12
904 13
904 14
904 15
904 16
904 17
904 18
904 19
904 20
904 21
904 22
904 23
904 24
904 25
904 26
904 27
904 28
904 29
904 30
904 31
904 32
904 33
904 34
904 35
904 36
904 37
904 38
904 39
904 40
904 41
904 42
904 43
904 44
9...

result:

ok Found equal strings: 57, 240

Test #32:

score: 0
Accepted
time: 17ms
memory: 7752kb

input:

1000
23
32
21
28
28
15
28
21
25
23
24
25
26
26
19
17
18
21
30
24
25
24
26
19
25
22
19
24
23
31
24
25
21
23
24
27
28
22
31
23
25
33
21
21
29
26
30
30
23
19
29
29
18
25
29
17
27
20
25
22
27
28
27
21
31
26
27
26
23
30
24
23
25
28
22
25
29
20
29
23
25
29
21
24
26
24
23
24
34
25
24
23
30
25
22
26
24
27
2...

output:

888 1
888 2
888 3
888 4
888 5
888 6
888 7
888 8
888 9
888 10
888 11
888 12
888 13
888 14
888 15
888 16
888 17
888 18
888 19
888 20
888 21
888 22
888 23
888 24
888 25
888 26
888 27
888 28
888 29
888 30
888 31
888 32
888 33
888 34
888 35
888 36
888 37
888 38
888 39
888 40
888 41
888 42
888 43
888 44
8...

result:

ok Found equal strings: 113, 116

Test #33:

score: 0
Accepted
time: 17ms
memory: 9300kb

input:

1000
26
28
24
24
31
31
30
26
23
26
27
23
26
27
23
24
25
27
23
22
29
28
31
24
25
32
32
19
24
23
24
22
32
28
23
26
25
30
23
27
24
26
26
24
22
27
27
27
25
24
28
29
20
22
22
24
28
23
26
23
25
20
23
25
31
25
23
27
27
27
25
23
24
27
23
28
25
29
25
24
23
24
21
20
22
25
29
25
24
24
32
29
26
26
33
26
19
21
3...

output:

319 1
319 2
319 3
319 4
319 5
319 6
319 7
319 8
319 9
319 10
319 11
319 12
319 13
319 14
319 15
319 16
319 17
319 18
319 19
319 20
319 21
319 22
319 23
319 24
319 25
319 26
319 27
319 28
319 29
319 30
319 31
319 32
319 33
319 34
319 35
319 36
319 37
319 38
319 39
319 40
319 41
319 42
319 43
319 44
3...

result:

ok Found equal strings: 175, 635

Test #34:

score: 0
Accepted
time: 13ms
memory: 8704kb

input:

1000
33
24
20
27
30
24
26
25
24
23
25
23
20
29
22
24
23
27
20
19
32
21
21
25
28
24
23
29
31
31
23
26
19
27
29
25
27
19
19
24
24
21
25
21
26
19
30
26
19
28
23
26
29
21
26
25
30
21
22
34
23
23
26
20
27
27
21
26
27
23
20
26
27
30
35
26
18
22
25
28
23
29
24
21
31
26
19
19
29
27
20
25
21
23
28
22
25
28
2...

output:

683 1
683 2
683 3
683 4
683 5
683 6
683 7
683 8
683 9
683 10
683 11
683 12
683 13
683 14
683 15
683 16
683 17
683 18
683 19
683 20
683 21
683 22
683 23
683 24
683 25
683 26
683 27
683 28
683 29
683 30
683 31
683 32
683 33
683 34
683 35
683 36
683 37
683 38
683 39
683 40
683 41
683 42
683 43
683 44
6...

result:

ok Found equal strings: 235, 509

Test #35:

score: 0
Accepted
time: 19ms
memory: 8024kb

input:

1000
34
29
25
25
25
30
25
28
29
24
28
26
31
23
25
32
24
21
21
26
25
17
28
33
22
27
22
25
21
27
30
19
28
31
29
22
31
30
22
28
20
26
29
13
25
23
21
20
25
23
29
21
27
18
24
31
25
21
31
25
24
25
27
26
26
22
22
22
30
29
25
23
21
24
28
24
25
23
19
19
24
23
32
31
27
18
22
29
25
26
22
30
24
18
25
25
28
28
2...

output:

862 1
862 2
862 3
862 4
862 5
862 6
862 7
862 8
862 9
862 10
862 11
862 12
862 13
862 14
862 15
862 16
862 17
862 18
862 19
862 20
862 21
862 22
862 23
862 24
862 25
862 26
862 27
862 28
862 29
862 30
862 31
862 32
862 33
862 34
862 35
862 36
862 37
862 38
862 39
862 40
862 41
862 42
862 43
862 44
8...

result:

ok Found equal strings: 30, 294

Test #36:

score: 0
Accepted
time: 19ms
memory: 7896kb

input:

1000
21
25
24
28
18
28
23
30
21
24
35
20
27
26
28
21
23
24
31
18
26
30
29
30
24
23
30
26
19
29
27
25
29
22
29
28
31
24
26
26
31
28
26
27
33
21
21
17
29
24
23
30
19
22
28
29
30
28
32
33
25
23
28
21
29
26
23
24
27
23
25
28
32
31
23
17
20
24
22
24
18
20
21
23
25
20
20
24
23
28
30
16
23
32
17
19
23
24
2...

output:

775 1
775 2
775 3
775 4
775 5
775 6
775 7
775 8
775 9
775 10
775 11
775 12
775 13
775 14
775 15
775 16
775 17
775 18
775 19
775 20
775 21
775 22
775 23
775 24
775 25
775 26
775 27
775 28
775 29
775 30
775 31
775 32
775 33
775 34
775 35
775 36
775 37
775 38
775 39
775 40
775 41
775 42
775 43
775 44
7...

result:

ok Found equal strings: 634, 904

Test #37:

score: 0
Accepted
time: 11ms
memory: 7808kb

input:

1000
27
24
22
23
23
28
24
27
23
31
23
17
26
32
26
24
31
18
28
24
24
23
15
26
26
28
29
24
28
27
26
21
25
21
19
24
24
29
30
30
24
25
26
25
25
26
23
25
23
26
29
23
21
25
20
31
19
27
25
24
25
27
19
23
23
26
32
31
23
24
26
22
23
24
29
25
25
25
30
24
21
24
24
25
26
24
22
23
20
25
23
28
27
22
26
24
28
32
2...

output:

448 1
448 2
448 3
448 4
448 5
448 6
448 7
448 8
448 9
448 10
448 11
448 12
448 13
448 14
448 15
448 16
448 17
448 18
448 19
448 20
448 21
448 22
448 23
448 24
448 25
448 26
448 27
448 28
448 29
448 30
448 31
448 32
448 33
448 34
448 35
448 36
448 37
448 38
448 39
448 40
448 41
448 42
448 43
448 44
4...

result:

ok Found equal strings: 693, 778

Test #38:

score: 0
Accepted
time: 21ms
memory: 9344kb

input:

1000
20
25
24
19
17
24
23
24
29
28
22
24
25
30
23
29
24
23
29
25
30
33
21
25
24
20
21
22
22
25
26
27
21
25
25
22
25
29
26
21
26
29
31
21
16
29
26
26
25
25
20
20
22
29
27
24
27
21
23
28
28
30
27
20
21
21
26
24
26
25
26
28
28
27
20
30
28
30
23
22
22
24
23
27
20
21
26
23
18
29
22
31
24
29
21
23
22
25
3...

output:

938 1
938 2
938 3
938 4
938 5
938 6
938 7
938 8
938 9
938 10
938 11
938 12
938 13
938 14
938 15
938 16
938 17
938 18
938 19
938 20
938 21
938 22
938 23
938 24
938 25
938 26
938 27
938 28
938 29
938 30
938 31
938 32
938 33
938 34
938 35
938 36
938 37
938 38
938 39
938 40
938 41
938 42
938 43
938 44
9...

result:

ok Found equal strings: 336, 912

Test #39:

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

input:

2
0

output:

1 2

result:

ok Found equal strings: 1, 2

Extra Test:

score: 0
Extra Test Passed