CSES - APIO 2018 - Results
Submission details
Task:Duathlon
Sender:Yytsi
Submission time:2019-04-21 22:14:41 +0300
Language:C++
Status:READY
Result:0
Feedback
groupverdictscore
#10
#20
#30
#40
#50
#60
#70
#80
#90
Test results
testverdicttimegroup
#1ACCEPTED0.03 s1, 2, 3, 4, 5, 6, 7, 8, 9details
#20.02 s1, 2, 6, 7, 8, 9details
#30.02 s1, 2, 8, 9details
#40.02 s1, 2, 8, 9details
#50.03 s1, 2, 8, 9details
#6ACCEPTED0.03 s1, 2, 3, 4, 5, 6, 7, 8, 9details
#70.03 s1, 2, 3, 6, 7, 8, 9details
#80.01 s1, 2, 3, 4, 5, 6, 7, 8, 9details
#90.02 s1, 2, 6, 7, 8, 9details
#100.02 s1, 2, 8, 9details
#110.03 s1, 2, 8, 9details
#120.01 s1, 2, 8, 9details
#130.02 s1, 2, 6, 7, 8, 9details
#140.02 s1, 2, 6, 7, 8, 9details
#150.01 s1, 2, 8, 9details
#160.02 s1, 2, 8, 9details
#170.02 s1, 2, 8, 9details
#180.01 s1, 2, 8, 9details
#190.01 s1, 2, 8, 9details
#200.03 s1, 2, 8, 9details
#210.02 s1, 2, 3, 4, 5, 6, 7, 8, 9details
#220.02 s1, 2, 3, 6, 7, 8, 9details
#230.01 s1, 2, 3, 4, 5, 6, 7, 8, 9details
#240.01 s1, 2, 8, 9details
#250.02 s1, 2, 8, 9details
#260.03 s1, 2, 8, 9details
#270.01 s1, 2, 8, 9details
#280.02 s1, 2, 6, 7, 8, 9details
#290.02 s1, 2, 8, 9details
#300.01 s1, 2, 8, 9details
#310.02 s1, 2, 6, 7, 8, 9details
#320.02 s1, 2, 8, 9details
#330.02 s1, 2, 8, 9details
#340.02 s1, 2, 8, 9details
#350.02 s1, 2, 8, 9details
#360.01 s1, 2, 3, 6, 7, 8, 9details
#370.01 s1, 2, 3, 6, 7, 8, 9details
#380.02 s2, 3, 4, 5, 6, 7, 8, 9details
#390.03 s2, 4, 5, 6, 7, 8, 9details
#400.02 s2, 8, 9details
#410.03 s2, 8, 9details
#420.04 s2, 8, 9details
#430.02 s2, 6, 7, 8, 9details
#440.01 s2, 6, 7, 8, 9details
#450.03 s2, 8, 9details
#460.03 s2, 8, 9details
#470.02 s2, 8, 9details
#480.02 s2, 8, 9details
#490.02 s1, 2, 8, 9details
#500.01 s2, 3, 4, 5, 6, 7, 8, 9details
#510.02 s2, 3, 6, 7, 8, 9details
#520.03 s2, 3, 4, 5, 6, 7, 8, 9details
#530.03 s2, 8, 9details
#540.02 s2, 8, 9details
#550.03 s2, 8, 9details
#560.04 s2, 8, 9details
#570.01 s2, 8, 9details
#580.02 s2, 8, 9details
#590.02 s2, 8, 9details
#600.02 s2, 8, 9details
#610.02 s2, 8, 9details
#620.02 s2, 8, 9details
#630.02 s2, 8, 9details
#640.02 s2, 8, 9details
#650.03 s2, 8, 9details
#660.01 s2, 8, 9details
#670.02 s2, 8, 9details
#68--3, 7, 9details
#69--3, 7, 9details
#70--3, 7, 9details
#71--3, 7, 9details
#72--3, 7, 9details
#73--3, 7, 9details
#74--3, 7, 9details
#75--3, 7, 9details
#76--3, 7, 9details
#77--3, 7, 9details
#780.62 s3, 7, 9details
#790.62 s3, 7, 9details
#800.64 s3, 7, 9details
#810.64 s3, 7, 9details
#820.65 s3, 7, 9details
#830.63 s3, 7, 9details
#84ACCEPTED0.02 s3, 5, 7, 9details
#85ACCEPTED0.02 s3, 5, 7, 9details
#86ACCEPTED0.03 s3, 5, 7, 9details
#87ACCEPTED0.03 s3, 5, 7, 9details
#88ACCEPTED0.02 s3, 5, 7, 9details
#89ACCEPTED0.03 s3, 5, 7, 9details
#90ACCEPTED0.02 s4, 5, 6, 7, 8, 9details
#91ACCEPTED0.02 s4, 5, 6, 7, 8, 9details
#92ACCEPTED0.02 s4, 5, 6, 7, 8, 9details
#93ACCEPTED0.02 s3, 4, 5, 6, 7, 8, 9details
#94ACCEPTED0.01 s4, 5, 6, 7, 8, 9details
#95ACCEPTED0.01 s4, 5, 6, 7, 8, 9details
#96ACCEPTED0.02 s3, 4, 5, 6, 7, 8, 9details
#97ACCEPTED0.02 s4, 5, 6, 7, 8, 9details
#98ACCEPTED0.04 s4, 5, 6, 7, 8, 9details
#99ACCEPTED0.03 s4, 5, 6, 7, 8, 9details
#100ACCEPTED0.03 s4, 5, 6, 7, 8, 9details
#101ACCEPTED0.02 s4, 5, 6, 7, 8, 9details
#102ACCEPTED0.02 s4, 5, 6, 7, 8, 9details
#103ACCEPTED0.03 s4, 5, 6, 7, 8, 9details
#104ACCEPTED0.01 s4, 5, 6, 7, 8, 9details
#105ACCEPTED0.03 s4, 5, 6, 7, 8, 9details
#106ACCEPTED0.01 s4, 5, 6, 7, 8, 9details
#107ACCEPTED0.02 s4, 5, 6, 7, 8, 9details
#108ACCEPTED0.02 s4, 5, 6, 7, 8, 9details
#109ACCEPTED0.01 s4, 5, 6, 7, 8, 9details
#110ACCEPTED0.10 s5, 7, 9details
#111ACCEPTED0.11 s5, 7, 9details
#112ACCEPTED0.11 s5, 7, 9details
#113ACCEPTED0.10 s5, 7, 9details
#114ACCEPTED0.10 s5, 7, 9details
#115ACCEPTED0.14 s3, 5, 7, 9details
#116ACCEPTED0.12 s5, 7, 9details
#117ACCEPTED0.11 s5, 7, 9details
#118ACCEPTED0.11 s5, 7, 9details
#119ACCEPTED0.10 s5, 7, 9details
#120ACCEPTED0.10 s5, 7, 9details
#121ACCEPTED0.10 s5, 7, 9details
#122ACCEPTED0.10 s5, 7, 9details
#123ACCEPTED0.08 s5, 7, 9details
#124ACCEPTED0.09 s5, 7, 9details
#125ACCEPTED0.07 s5, 7, 9details
#126ACCEPTED0.06 s5, 7, 9details
#127ACCEPTED0.07 s5, 7, 9details
#128ACCEPTED0.07 s5, 7, 9details
#129ACCEPTED0.09 s5, 7, 9details
#130ACCEPTED0.01 s4, 5, 6, 7, 8, 9details
#131ACCEPTED0.01 s4, 5, 6, 7, 8, 9details
#1320.69 s6, 7, 8, 9details
#1330.61 s6, 7, 8, 9details
#1340.58 s6, 7, 8, 9details
#1350.61 s6, 7, 8, 9details
#1360.59 s6, 7, 8, 9details
#1370.62 s6, 7, 8, 9details
#1380.60 s6, 7, 8, 9details
#1390.61 s6, 7, 8, 9details
#1400.69 s6, 7, 8, 9details
#1410.61 s6, 7, 8, 9details
#1420.60 s6, 7, 8, 9details
#1430.61 s6, 7, 8, 9details
#1440.59 s6, 7, 8, 9details
#1450.60 s6, 7, 8, 9details
#1460.60 s6, 7, 8, 9details
#1470.63 s6, 7, 8, 9details
#1480.60 s6, 7, 8, 9details
#1490.60 s6, 7, 8, 9details
#150--6, 7, 8, 9details
#1510.58 s6, 7, 8, 9details
#1520.86 s6, 7, 8, 9details
#1530.58 s6, 7, 8, 9details
#1540.56 s3, 6, 7, 8, 9details
#1550.59 s3, 6, 7, 8, 9details
#156ACCEPTED0.02 s3, 4, 5, 6, 7, 8, 9details
#157ACCEPTED0.11 s5, 7, 9details
#158ACCEPTED0.11 s5, 7, 9details
#1590.81 s7, 9details
#1600.71 s7, 9details
#1610.67 s7, 9details
#1620.69 s7, 9details
#1630.67 s7, 9details
#1640.75 s7, 9details
#1650.76 s7, 9details
#1660.78 s7, 9details
#1670.80 s7, 9details
#1680.85 s7, 9details
#1690.92 s7, 9details
#170--7, 9details
#1710.65 s7, 9details
#1720.65 s7, 9details
#1730.67 s7, 9details
#1740.66 s7, 9details
#1750.68 s7, 9details
#1760.66 s7, 9details
#1770.70 s7, 9details
#1780.64 s7, 9details
#1790.64 s7, 9details
#180--7, 9details
#181--7, 9details
#1820.67 s7, 9details
#183--7, 9details
#184ACCEPTED0.01 s3, 4, 5, 6, 7, 8, 9details
#185ACCEPTED0.02 s4, 5, 6, 7, 8, 9details
#1860.68 s8, 9details
#1870.65 s8, 9details
#1880.69 s8, 9details
#1890.58 s8, 9details
#1900.58 s8, 9details
#1910.58 s8, 9details
#1920.62 s8, 9details
#1930.58 s8, 9details
#1940.59 s8, 9details
#1950.73 s8, 9details
#1960.60 s8, 9details
#1970.61 s8, 9details
#1980.58 s8, 9details
#1990.62 s8, 9details
#2000.72 s8, 9details
#2010.72 s8, 9details
#2020.63 s8, 9details
#2030.61 s8, 9details
#2040.60 s8, 9details
#2050.60 s8, 9details
#2060.58 s8, 9details
#2070.60 s8, 9details
#2080.59 s8, 9details
#209--8, 9details
#2100.84 s8, 9details
#211ACCEPTED0.02 s3, 5, 7, 9details
#212--7, 9details
#213--9details
#2140.92 s9details
#2150.76 s9details
#2160.60 s9details
#2170.63 s9details
#2180.68 s9details
#2190.68 s9details
#2200.70 s9details
#2210.76 s9details
#2220.77 s9details
#2230.90 s9details
#2240.87 s9details
#2250.68 s9details
#2260.69 s9details
#2270.68 s9details
#2280.65 s9details
#2290.65 s9details
#2300.65 s9details
#2310.66 s9details
#232--9details
#233--9details

Compiler report

input/code.cpp: In function 'void idfs(int, int)':
input/code.cpp:3:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
 #define FOR(i, a, b) for (int i=a; i<(b); i++)
                                     ^
input/code.cpp:23:3: note: in expansion of macro 'FOR'
   FOR(i,0,adj[x].size()) {
   ^~~
input/code.cpp: In function 'void dfs(int, int)':
input/code.cpp:3:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
 #define FOR(i, a, b) for (int i=a; i<(b); i++)
                                     ^
input/code.cpp:38:3: note: in expansion of macro 'FOR'
   FOR(i,0,adj[x].size()) {
   ^~~
input/code.cpp:3:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
 #define FOR(i, a, b) for (int i=a; i<(b); i++)
                                     ^
input/code.cpp:46:3: note: in expansion of macro 'FOR'
   FOR(i,0,adj[x].size()) {
   ^~~
input/code.cpp: In function 'int main()':
input/co...

Code

#include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for (int i=a; i<(b); i++)
#define F first
#define S second
#define pb push_back
typedef long long ll;
typedef pair<int, int> pii;

ll n, m;
vector<int> adj[101010];
ll sz[101010];
int vis[101010];
ll thisn[101010];
vector<int> cc;

void idfs(int x, int p) {
  if (vis[x] == 1) return;
  vis[x] = 1;
  cc.pb(x);

  sz[x] = 1;
  FOR(i,0,adj[x].size()) {
    int u = adj[x][i];
    if (u == p) continue;
    idfs(u, x);
    sz[x] += sz[u];
  }
  //cout<<x<<" "<<sz[x]<<"\n";
}

ll res;
void dfs(int x, int p) {
  ll chsum = sz[x] - 1;

  // (subtree) this (subtree)
  int rr = 0;
  FOR(i,0,adj[x].size()) {
    int u = adj[x][i];
    if (u == p) continue;
    rr++;
  }

  if (rr == 0) return;

  FOR(i,0,adj[x].size()) {
    int u = adj[x][i];
    if (u == p) continue;
    dfs(u, x);
    res += sz[u] * (chsum - sz[u]);
  }

  // (parent) this (subtree)
  ll par = thisn[x] - (chsum + 1);
  res += par * chsum * 2LL;
  //cout<<x<<" "<<par<<" "<<chsum<<"\n";
}

int vv[101010];
int cid = 1;

int main() {
  ios_base::sync_with_stdio(0); cin.tie(0);
  cin>>n>>m;

  FOR(i,0,m) {
    int a,b; cin>>a>>b;
    adj[a].pb(b);
    adj[b].pb(a);
  }

  if (n <= 50) {
    FOR(a,1,n+1) {
      FOR(b,1,n+1) {
        if (a == b) continue;
        queue<int> q;
        cid++;
        FOR(i,0,adj[b].size()) {
          int u = adj[b][i];
          if (u == a) continue;
          q.push(u);
          vv[u] = cid;
        }
        while (q.size()) {
          int t = q.front();
          res++;
          q.pop();
          FOR(i,0,adj[t].size()) {
            int u = adj[t][i];
            if (u == a || u == b) continue;
            if (vv[u] == cid) continue;
            vv[u] = cid;
            q.push(u);
          }
        }
      }
    }

    return cout<<res/2<<"\n", 0;
  }

  FOR(i,1,n+1) {
    if (vis[i]) continue;
    idfs(i, i);
    for (int v : cc) thisn[v] = cc.size();
    dfs(cc[0], cc[0]);
    cc.clear();
  }
  
  cout<<res<<"\n";
}

Test details

Test 1

Group: 1, 2, 3, 4, 5, 6, 7, 8, 9

Verdict: ACCEPTED

input
4 3
1 2
2 3
3 4

correct output
8

user output
8

Test 2

Group: 1, 2, 6, 7, 8, 9

Verdict:

input
4 4
1 2
2 3
3 4
4 2

correct output
14

user output
10

Test 3

Group: 1, 2, 8, 9

Verdict:

input
5 5
4 2
2 5
4 1
2 1
...

correct output
24

user output
18

Test 4

Group: 1, 2, 8, 9

Verdict:

input
5 8
2 3
5 1
2 4
1 3
...

correct output
60

user output
30

Test 5

Group: 1, 2, 8, 9

Verdict:

input
5 10
3 2
4 3
2 5
4 5
...

correct output
60

user output
30

Test 6

Group: 1, 2, 3, 4, 5, 6, 7, 8, 9

Verdict: ACCEPTED

input
2 1
2 1

correct output
0

user output
0

Test 7

Group: 1, 2, 3, 6, 7, 8, 9

Verdict:

input
3 3
1 3
2 3
1 2

correct output
6

user output
3

Test 8

Group: 1, 2, 3, 4, 5, 6, 7, 8, 9

Verdict:

input
10 1
1 2

correct output
0

user output
8

Test 9

Group: 1, 2, 6, 7, 8, 9

Verdict:

input
10 10
1 9
7 6
2 4
7 8
...

correct output
202

user output
291

Test 10

Group: 1, 2, 8, 9

Verdict:

input
10 20
10 1
5 7
1 2
5 3
...

correct output
522

user output
342

Test 11

Group: 1, 2, 8, 9

Verdict:

input
10 30
5 6
9 5
4 9
6 7
...

correct output
720

user output
360

Test 12

Group: 1, 2, 8, 9

Verdict:

input
10 45
8 2
8 9
5 2
4 9
...

correct output
720

user output
360

Test 13

Group: 1, 2, 6, 7, 8, 9

Verdict:

input
10 11
6 2
3 8
3 6
7 1
...

correct output
192

user output
304

Test 14

Group: 1, 2, 6, 7, 8, 9

Verdict:

input
10 11
2 5
3 8
3 6
1 10
...

correct output
236

user output
290

Test 15

Group: 1, 2, 8, 9

Verdict:

input
10 12
2 1
4 8
6 1
1 10
...

correct output
284

user output
331

Test 16

Group: 1, 2, 8, 9

Verdict:

input
10 11
6 2
4 8
7 6
1 10
...

correct output
452

user output
332

Test 17

Group: 1, 2, 8, 9

Verdict:

input
10 12
2 4
4 5
6 8
1 10
...

correct output
410

user output
322

Test 18

Group: 1, 2, 8, 9

Verdict:

input
10 11
10 2
4 8
2 6
3 10
...

correct output
488

user output
334

Test 19

Group: 1, 2, 8, 9

Verdict:

input
10 11
9 2
8 6
2 7
1 10
...

correct output
522

user output
342

Test 20

Group: 1, 2, 8, 9

Verdict:

input
10 11
8 2
8 7
2 6
1 10
...

correct output
522

user output
342

Test 21

Group: 1, 2, 3, 4, 5, 6, 7, 8, 9

Verdict:

input
10 5
2 3
3 4
5 6
7 8
...

correct output
4

user output
54

Test 22

Group: 1, 2, 3, 6, 7, 8, 9

Verdict:

input
10 4
3 4
4 5
5 3
9 10

correct output
6

user output
32

Test 23

Group: 1, 2, 3, 4, 5, 6, 7, 8, 9

Verdict:

input
10 2
2 3
4 5

correct output
0

user output
16

Test 24

Group: 1, 2, 8, 9

Verdict:

input
10 12
1 2
2 3
3 1
3 4
...

correct output
222

user output
310

Test 25

Group: 1, 2, 8, 9

Verdict:

input
9 11
1 2
2 3
3 1
4 5
...

correct output
184

user output
216

Test 26

Group: 1, 2, 8, 9

Verdict:

input
8 9
4 5
5 1
2 7
3 4
...

correct output
116

user output
140

Test 27

Group: 1, 2, 8, 9

Verdict:

input
9 10
5 3
8 2
1 9
6 3
...

correct output
144

user output
215

Test 28

Group: 1, 2, 6, 7, 8, 9

Verdict:

input
10 11
2 5
5 10
6 5
3 9
...

correct output
192

user output
304

Test 29

Group: 1, 2, 8, 9

Verdict:

input
8 10
8 6
4 7
3 2
4 1
...

correct output
180

user output
148

Test 30

Group: 1, 2, 8, 9

Verdict:

input
9 10
6 5
2 8
4 9
2 3
...

correct output
212

user output
230

Test 31

Group: 1, 2, 6, 7, 8, 9

Verdict:

input
10 11
5 1
10 5
7 2
5 7
...

correct output
236

user output
290

Test 32

Group: 1, 2, 8, 9

Verdict:

input
8 9
1 8
7 1
6 2
1 6
...

correct output
202

user output
152

Test 33

Group: 1, 2, 8, 9

Verdict:

input
9 10
7 2
1 5
9 3
1 8
...

correct output
302

user output
229

Test 34

Group: 1, 2, 8, 9

Verdict:

input
10 12
4 6
10 2
10 3
8 3
...

correct output
284

user output
331

Test 35

Group: 1, 2, 8, 9

Verdict:

input
9 10
8 6
2 7
6 4
3 2
...

correct output
84

user output
120

Test 36

Group: 1, 2, 3, 6, 7, 8, 9

Verdict:

input
9 9
6 4
2 7
3 7
2 3
...

correct output
18

user output
63

Test 37

Group: 1, 2, 3, 6, 7, 8, 9

Verdict:

input
10 7
3 7
9 5
9 1
10 3
...

correct output
30

user output
72

Test 38

Group: 2, 3, 4, 5, 6, 7, 8, 9

Verdict:

input
50 1
20 38

correct output
0

user output
48

Test 39

Group: 2, 4, 5, 6, 7, 8, 9

Verdict:

input
50 25
47 39
33 28
33 5
27 47
...

correct output
70

user output
2365

Test 40

Group: 2, 8, 9

Verdict:

input
50 50
25 21
23 37
28 23
19 25
...

correct output
46916

user output
40681

Test 41

Group: 2, 8, 9

Verdict:

input
50 75
25 14
16 50
43 19
49 48
...

correct output
81712

user output
55597

Test 42

Group: 2, 8, 9

Verdict:

input
50 100
14 19
33 38
33 15
21 16
...

correct output
99272

user output
54052

Test 43

Group: 2, 6, 7, 8, 9

Verdict:

input
48 20
5 6
9 11
13 14
13 15
...

correct output
22

user output
1280

Test 44

Group: 2, 6, 7, 8, 9

Verdict:

input
48 32
1 4
2 3
5 6
5 8
...

correct output
70

user output
2278

Test 45

Group: 2, 8, 9

Verdict:

input
48 36
2 3
2 4
5 6
6 7
...

correct output
110

user output
2601

Test 46

Group: 2, 8, 9

Verdict:

input
48 40
1 4
3 4
5 6
5 8
...

correct output
130

user output
2875

Test 47

Group: 2, 8, 9

Verdict:

input
48 44
2 4
3 4
5 6
6 8
...

correct output
158

user output
3016

Test 48

Group: 2, 8, 9

Verdict:

input
48 48
1 3
2 4
3 4
5 6
...

correct output
186

user output
3157

Test 49

Group: 1, 2, 8, 9

Verdict:

input
8 11
1 3
1 4
2 3
2 4
...

correct output
48

user output
72

Test 50

Group: 2, 3, 4, 5, 6, 7, 8, 9

Verdict:

input
50 20
3 4
7 8
8 9
11 12
...

correct output
8

user output
1148

Test 51

Group: 2, 3, 6, 7, 8, 9

Verdict:

input
50 11
11 12
13 14
14 15
15 13
...

correct output
6

user output
528

Test 52

Group: 2, 3, 4, 5, 6, 7, 8, 9

Verdict:

input
50 5
6 7
9 10
15 16
38 39
...

correct output
0

user output
240

Test 53

Group: 2, 8, 9

Verdict:

input
50 65
33 14
13 1
37 12
36 9
...

correct output
15810

user output
54691

Test 54

Group: 2, 8, 9

Verdict:

input
50 64
6 50
7 32
48 8
5 36
...

correct output
20214

user output
55975

Test 55

Group: 2, 8, 9

Verdict:

input
50 56
46 39
30 44
41 15
38 2
...

correct output
48822

user output
56778

Test 56

Group: 2, 8, 9

Verdict:

input
50 56
46 49
4 44
41 37
2 21
...

correct output
55018

user output
56652

Test 57

Group: 2, 8, 9

Verdict:

input
50 55
12 46
10 4
49 41
38 2
...

correct output
56418

user output
57251

Test 58

Group: 2, 8, 9

Verdict:

input
50 53
46 12
3 13
15 41
35 38
...

correct output
71034

user output
57714

Test 59

Group: 2, 8, 9

Verdict:

input
49 66
11 26
12 6
8 11
10 30
...

correct output
35792

user output
49480

Test 60

Group: 2, 8, 9

Verdict:

input
50 69
33 14
35 42
16 46
17 18
...

correct output
30738

user output
53600

Test 61

Group: 2, 8, 9

Verdict:

input
50 64
6 14
10 32
27 41
25 21
...

correct output
15600

user output
39082

Test 62

Group: 2, 8, 9

Verdict:

input
50 63
6 12
32 10
27 29
43 5
...

correct output
9568

user output
26296

Test 63

Group: 2, 8, 9

Verdict:

input
50 59
14 46
18 30
41 15
40 21
...

correct output
2672

user output
12942

Test 64

Group: 2, 8, 9

Verdict:

input
50 53
46 12
3 13
15 41
42 35
...

correct output
572

user output
4974

Test 65

Group: 2, 8, 9

Verdict:

input
49 66
11 45
12 6
8 39
10 30
...

correct output
14628

user output
53428

Test 66

Group: 2, 8, 9

Verdict:

input
50 69
33 14
35 42
39 46
17 18
...

correct output
14532

user output
56699

Test 67

Group: 2, 8, 9

Verdict:

input
49 67
4 45
37 6
7 8
17 10
...

correct output
19116

user output
52029

Test 68

Group: 3, 7, 9

Verdict:

input
100000 100000
99066 9736
97999 27208
92829 65523
9258 68891
...

correct output
999970000200000

user output
(empty)

Test 69

Group: 3, 7, 9

Verdict:

input
100000 100000
62847 99443
62239 25917
85940 49167
41858 91123
...

correct output
999970000200000

user output
(empty)

Test 70

Group: 3, 7, 9

Verdict:

input
100000 99999
74355 9736
27208 97999
93640 65523
9258 25640
...

correct output
166566735194792

user output
(empty)

Test 71

Group: 3, 7, 9

Verdict:

input
100000 99999
99443 80031
42649 25917
49167 85940
73132 41858
...

correct output
425735046905416

user output
(empty)

Test 72

Group: 3, 7, 9

Verdict:

input
100000 99999
9736 99066
27208 97999
65523 92829
68891 9258
...

correct output
86668147652172

user output
(empty)

Test 73

Group: 3, 7, 9

Verdict:

input
100000 99999
62847 99443
25917 62239
49167 85940
41858 91123
...

correct output
95198166603710

user output
(empty)

Test 74

Group: 3, 7, 9

Verdict:

input
100000 99997
60590 74355
27208 97999
93640 65523
53429 25640
...

correct output
24081604632486

user output
(empty)

Test 75

Group: 3, 7, 9

Verdict:

input
100000 99997
80031 92060
42649 65875
85940 49167
73132 25104
...

correct output
41885584243130

user output
(empty)

Test 76

Group: 3, 7, 9

Verdict:

input
100000 99994
31410 30123
40784 27208
76564 9768
48108 72637
...

correct output
5964057540826

user output
(empty)

Test 77

Group: 3, 7, 9

Verdict:

input
100000 99994
73160 18881
18177 20586
85940 49167
78877 65147
...

correct output
14206403764352

user output
(empty)

Test 78

Group: 3, 7, 9

Verdict:

input
100000 85073
21961 22442
57815 38745
6702 98961
10868 31761
...

correct output
913638

user output
(empty)

Test 79

Group: 3, 7, 9

Verdict:

input
100000 83279
22255 62514
73445 57759
573 91564
81210 76142
...

correct output
1521868

user output
(empty)

Test 80

Group: 3, 7, 9

Verdict:

input
100000 76586
40525 20485
80362 6806
72451 92428
86050 5618
...

correct output
441096

user output
(empty)

Test 81

Group: 3, 7, 9

Verdict:

input
100000 75401
65480 90274
20021 92834
87687 73330
68970 93392
...

correct output
713038

user output
(empty)

Test 82

Group: 3, 7, 9

Verdict:

input
100000 56625
44482 72183
39765 76389
57734 39719
58560 28312
...

correct output
134416

user output
(empty)

Test 83

Group: 3, 7, 9

Verdict:

input
100000 56871
69929 64551
66604 85758
21251 31184
17133 2385
...

correct output
201172

user output
(empty)

Test 84

Group: 3, 5, 7, 9

Verdict: ACCEPTED

input
100000 200
97365 72066
841 73655
86049 54577
43332 24165
...

correct output
0

user output
0

Test 85

Group: 3, 5, 7, 9

Verdict: ACCEPTED

input
100000 200
47105 47238
73536 32780
75961 77752
48800 38420
...

correct output
0

user output
0

Test 86

Group: 3, 5, 7, 9

Verdict: ACCEPTED

input
100000 150
2927 76014
33992 39604
93816 23780
14255 75588
...

correct output
0

user output
0

Test 87

Group: 3, 5, 7, 9

Verdict: ACCEPTED

input
100000 150
51539 56353
47370 15262
84868 23525
85947 2851
...

correct output
0

user output
0

Test 88

Group: 3, 5, 7, 9

Verdict: ACCEPTED

input
100000 100
42578 92727
44079 94089
27008 3808
12618 35839
...

correct output
2

user output
2

Test 89

Group: 3, 5, 7, 9

Verdict: ACCEPTED

input
100000 100
13719 18999
33255 81643
60478 93541
72362 22726
...

correct output
0

user output
0

Test 90

Group: 4, 5, 6, 7, 8, 9

Verdict: ACCEPTED

input
1000 999
807 306
179 363
331 228
462 903
...

correct output
9768318

user output
9768318

Test 91

Group: 4, 5, 6, 7, 8, 9

Verdict: ACCEPTED

input
1000 999
626 306
169 363
826 228
588 903
...

correct output
10287916

user output
10287916

Test 92

Group: 4, 5, 6, 7, 8, 9

Verdict: ACCEPTED

input
1000 999
278 306
737 363
169 228
874 903
...

correct output
10447968

user output
10447968

Test 93

Group: 3, 4, 5, 6, 7, 8, 9

Verdict: ACCEPTED

input
1000 999
401 866
709 899
927 606
350 331
...

correct output
332334000

user output
332334000

Test 94

Group: 4, 5, 6, 7, 8, 9

Verdict: ACCEPTED

input
1000 999
401 866
709 899
927 411
350 331
...

correct output
221661704

user output
221661704

Test 95

Group: 4, 5, 6, 7, 8, 9

Verdict: ACCEPTED

input
1000 999
401 213
709 41
927 606
350 580
...

correct output
172886730

user output
172886730

Test 96

Group: 3, 4, 5, 6, 7, 8, 9

Verdict: ACCEPTED

input
1000 999
840 577
964 43
254 477
917 899
...

correct output
332334000

user output
332334000

Test 97

Group: 4, 5, 6, 7, 8, 9

Verdict: ACCEPTED

input
1000 999
873 577
353 43
254 864
917 929
...

correct output
219115068

user output
219115068

Test 98

Group: 4, 5, 6, 7, 8, 9

Verdict: ACCEPTED

input
1000 999
902 577
964 43
254 477
917 929
...

correct output
165885318

user output
165885318

Test 99

Group: 4, 5, 6, 7, 8, 9

Verdict: ACCEPTED

input
1000 998
26 625
251 854
647 549
819 3
...

correct output
7180814

user output
7180814

Test 100

Group: 4, 5, 6, 7, 8, 9

Verdict: ACCEPTED

input
1000 997
210 567
721 772
483 907
351 422
...

correct output
7320038

user output
7320038

Test 101

Group: 4, 5, 6, 7, 8, 9

Verdict: ACCEPTED

input
1000 995
286 614
504 149
408 821
288 912
...

correct output
3081468

user output
3081468

Test 102

Group: 4, 5, 6, 7, 8, 9

Verdict: ACCEPTED

input
1000 990
301 656
550 755
718 433
316 289
...

correct output
1034972

user output
1034972

Test 103

Group: 4, 5, 6, 7, 8, 9

Verdict: ACCEPTED

input
1000 900
902 920
261 391
385 809
107 421
...

correct output
49812

user output
49812

Test 104

Group: 4, 5, 6, 7, 8, 9

Verdict: ACCEPTED

input
1000 800
435 415
162 244
271 563
430 471
...

correct output
18612

user output
18612

Test 105

Group: 4, 5, 6, 7, 8, 9

Verdict: ACCEPTED

input
1000 500
340 83
253 454
738 895
4 434
...

correct output
1590

user output
1590

Test 106

Group: 4, 5, 6, 7, 8, 9

Verdict: ACCEPTED

input
1000 999
964 306
964 363
964 228
964 903
...

correct output
997002

user output
997002

Test 107

Group: 4, 5, 6, 7, 8, 9

Verdict: ACCEPTED

input
1000 999
964 306
650 363
964 228
650 903
...

correct output
1494932

user output
1494932

Test 108

Group: 4, 5, 6, 7, 8, 9

Verdict: ACCEPTED

input
1000 999
964 306
967 363
650 228
964 903
...

correct output
1901876

user output
1901876

Test 109

Group: 4, 5, 6, 7, 8, 9

Verdict: ACCEPTED

input
1000 999
650 306
964 363
129 228
129 903
...

correct output
2414278

user output
2414278

Test 110

Group: 5, 7, 9

Verdict: ACCEPTED

input
100000 99999
93580 61654
92036 34125
65979 44228
77912 28042
...

correct output
190447021392

user output
190447021392

Test 111

Group: 5, 7, 9

Verdict: ACCEPTED

input
100000 99999
93580 78980
92036 50445
97263 44228
77912 86130
...

correct output
201384848224

user output
201384848224

Test 112

Group: 5, 7, 9

Verdict: ACCEPTED

input
100000 99999
93580 35835
92036 74371
86924 44228
77912 90346
...

correct output
195914405400

user output
195914405400

Test 113

Group: 5, 7, 9

Verdict: ACCEPTED

input
100000 99999
93580 23541
92036 63835
56659 44228
77912 82976
...

correct output
193788565732

user output
193788565732

Test 114

Group: 5, 7, 9

Verdict: ACCEPTED

input
100000 99999
93580 98482
92036 35465
76445 44228
77912 92024
...

correct output
181547449698

user output
181547449698

Test 115

Group: 3, 5, 7, 9

Verdict: ACCEPTED

input
100000 99999
93580 35789
92036 67354
33834 44228
77912 95889
...

correct output
333323333400000

user output
333323333400000

Test 116

Group: 5, 7, 9

Verdict: ACCEPTED

input
100000 99999
93580 30611
92036 67354
81670 44228
77912 95889
...

correct output
222270008008806

user output
222270008008806

Test 117

Group: 5, 7, 9

Verdict: ACCEPTED

input
100000 99999
93580 35789
92036 67354
81670 44228
77912 95889
...

correct output
166648211458882

user output
166648211458882

Test 118

Group: 5, 7, 9

Verdict: ACCEPTED

input
100000 99999
93580 35789
92036 7520
33834 44228
77912 41902
...

correct output
110822341775364

user output
110822341775364

Test 119

Group: 5, 7, 9

Verdict: ACCEPTED

input
100000 99998
94593 12000
91950 92572
99249 93161
59086 46873
...

correct output
89531202612

user output
89531202612

Test 120

Group: 5, 7, 9

Verdict: ACCEPTED

input
100000 99997
10999 33725
54586 55279
88188 45257
47814 20872
...

correct output
153038524728

user output
153038524728

Test 121

Group: 5, 7, 9

Verdict: ACCEPTED

input
100000 99995
23617 80452
40715 42460
63780 87100
53423 27871
...

correct output
40013604918

user output
40013604918

Test 122

Group: 5, 7, 9

Verdict: ACCEPTED

input
100000 99990
23940 83657
234 86608
27764 37923
75292 20001
...

correct output
25977956118

user output
25977956118

Test 123

Group: 5, 7, 9

Verdict: ACCEPTED

input
100000 90000
68608 61987
45286 53407
77688 58686
45389 79180
...

correct output
5482310

user output
5482310

Test 124

Group: 5, 7, 9

Verdict: ACCEPTED

input
100000 80000
10448 99519
99535 29571
75263 69902
27641 88545
...

correct output
1633566

user output
1633566

Test 125

Group: 5, 7, 9

Verdict: ACCEPTED

input
100000 50000
84875 77147
27659 90311
12632 14657
43327 27087
...

correct output
153674

user output
153674

Test 126

Group: 5, 7, 9

Verdict: ACCEPTED

input
100000 99999
93580 64268
92036 64268
64268 44228
77912 64268
...

correct output
9999700002

user output
9999700002

Test 127

Group: 5, 7, 9

Verdict: ACCEPTED

input
100000 99999
93580 64268
92036 66535
64268 44228
77912 66535
...

correct output
14999499282

user output
14999499282

Test 128

Group: 5, 7, 9

Verdict: ACCEPTED

input
100000 99999
93580 9758
92036 9758
66535 44228
77912 9758
...

correct output
18879584562

user output
18879584562

Test 129

Group: 5, 7, 9

Verdict: ACCEPTED

input
100000 99999
93580 84212
92036 9758
84212 44228
77912 9758
...

correct output
25993771760

user output
25993771760

Test 130

Group: 4, 5, 6, 7, 8, 9

Verdict: ACCEPTED

input
1000 999
306 59
363 619
228 520
903 304
...

correct output
9310926

user output
9310926

Test 131

Group: 4, 5, 6, 7, 8, 9

Verdict: ACCEPTED

input
1000 999
171 797
794 134
274 650
716 358
...

correct output
12414654

user output
12414654

Test 132

Group: 6, 7, 8, 9

Verdict:

input
1000 1166
875 63
145 420
395 176
825 555
...

correct output
14204312

user output
(empty)

Test 133

Group: 6, 7, 8, 9

Verdict:

input
1000 1199
810 466
450 533
168 106
18 120
...

correct output
21471588

user output
(empty)

Test 134

Group: 6, 7, 8, 9

Verdict:

input
1000 1140
755 63
778 822
226 491
482 195
...

correct output
42636598

user output
(empty)

Test 135

Group: 6, 7, 8, 9

Verdict:

input
1000 1111
306 494
153 8
251 756
463 715
...

correct output
56898408

user output
(empty)

Test 136

Group: 6, 7, 8, 9

Verdict:

input
1000 1084
235 306
982 584
983 754
990 130
...

correct output
71968000

user output
(empty)

Test 137

Group: 6, 7, 8, 9

Verdict:

input
1000 1064
306 494
61 360
249 983
903 130
...

correct output
107792038

user output
(empty)

Test 138

Group: 6, 7, 8, 9

Verdict:

input
1000 1045
494 306
363 798
258 228
283 903
...

correct output
134425838

user output
(empty)

Test 139

Group: 6, 7, 8, 9

Verdict:

input
1000 1036
306 235
363 798
637 228
903 130
...

correct output
104902970

user output
(empty)

Test 140

Group: 6, 7, 8, 9

Verdict:

input
1000 1021
494 306
363 13
258 228
903 283
...

correct output
261786212

user output
(empty)

Test 141

Group: 6, 7, 8, 9

Verdict:

input
1000 1169
784 92
229 863
395 179
712 225
...

correct output
257922324

user output
(empty)

Test 142

Group: 6, 7, 8, 9

Verdict:

input
1000 1180
876 135
53 86
386 24
107 65
...

correct output
175234620

user output
(empty)

Test 143

Group: 6, 7, 8, 9

Verdict:

input
1000 1201
383 808
439 170
955 560
406 95
...

correct output
265992944

user output
(empty)

Test 144

Group: 6, 7, 8, 9

Verdict:

input
1000 1198
485 155
989 470
408 600
417 80
...

correct output
184643184

user output
(empty)

Test 145

Group: 6, 7, 8, 9

Verdict:

input
1000 1198
873 760
896 484
222 745
28 91
...

correct output
18303366

user output
(empty)

Test 146

Group: 6, 7, 8, 9

Verdict:

input
1000 1190
896 290
612 132
915 997
515 487
...

correct output
14707506

user output
(empty)

Test 147

Group: 6, 7, 8, 9

Verdict:

input
1000 1201
546 319
296 80
834 831
567 658
...

correct output
3942050

user output
(empty)

Test 148

Group: 6, 7, 8, 9

Verdict:

input
1000 1107
412 657
570 897
624 822
273 658
...

correct output
89864

user output
(empty)

Test 149

Group: 6, 7, 8, 9

Verdict:

input
1000 1001
412 657
718 137
328 240
936 184
...

correct output
25370

user output
(empty)

Test 150

Group: 6, 7, 8, 9

Verdict:

input
1000 1169
964 92
964 863
395 179
712 225
...

correct output
2661992

user output
(empty)

Test 151

Group: 6, 7, 8, 9

Verdict:

input
1000 1160
964 320
214 650
643 460
507 985
...

correct output
3843994

user output
(empty)

Test 152

Group: 6, 7, 8, 9

Verdict:

input
1000 1201
964 808
439 964
955 560
406 95
...

correct output
5267138

user output
(empty)

Test 153

Group: 6, 7, 8, 9

Verdict:

input
1000 1200
341 345
607 129
369 269
417 80
...

correct output
7129602

user output
(empty)

Test 154

Group: 3, 6, 7, 8, 9

Verdict:

input
1000 209
7 8
11 12
15 16
17 18
...

correct output
94

user output
(empty)

Test 155

Group: 3, 6, 7, 8, 9

Verdict:

input
1000 104
1 2
6 7
33 34
37 38
...

correct output
30

user output
(empty)

Test 156

Group: 3, 4, 5, 6, 7, 8, 9

Verdict: ACCEPTED

input
1000 50
24 25
32 33
50 51
66 67
...

correct output
4

user output
4

Test 157

Group: 5, 7, 9

Verdict: ACCEPTED

input
100000 99999
37933 93580
89123 92036
44228 19913
87740 77912
...

correct output
194000853086

user output
194000853086

Test 158

Group: 5, 7, 9

Verdict: ACCEPTED

input
100000 99999
99626 75681
33060 3940
46571 1885
26776 73259
...

correct output
236003595576

user output
236003595576

Test 159

Group: 7, 9

Verdict:

input
100000 116708
11465 73282
12162 54087
77696 80155
97732 57686
...

correct output
306346110746

user output
(empty)

Test 160

Group: 7, 9

Verdict:

input
100000 120076
32388 1609
84095 38589
16189 25580
26916 80592
...

correct output
437333599938

user output
(empty)

Test 161

Group: 7, 9

Verdict:

input
100000 114507
49486 42743
50674 60107
70794 45029
53070 40594
...

correct output
889653968792

user output
(empty)

Test 162

Group: 7, 9

Verdict:

input
100000 110930
44184 97679
25601 6581
90640 29621
44775 62176
...

correct output
1166095778082

user output
(empty)

Test 163

Group: 7, 9

Verdict:

input
100000 108603
39780 28330
68956 75898
36786 89859
50829 96546
...

correct output
1524799394370

user output
(empty)

Test 164

Group: 7, 9

Verdict:

input
100000 105961
12 13454
1533 19548
69995 37975
15922 17032
...

correct output
2235450662748

user output
(empty)

Test 165

Group: 7, 9

Verdict:

input
100000 104598
77076 55792
97133 48331
66418 19311
98451 27454
...

correct output
3317425053704

user output
(empty)

Test 166

Group: 7, 9

Verdict:

input
100000 103685
41667 40022
96822 56557
84701 68648
69626 96433
...

correct output
3607280141380

user output
(empty)

Test 167

Group: 7, 9

Verdict:

input
100000 101955
34605 86146
84342 80781
78497 888
8855 66972
...

correct output
7697898230340

user output
(empty)

Test 168

Group: 7, 9

Verdict:

input
100000 100390
82710 53665
64859 68470
95359 85816
77912 20455
...

correct output
28764549656680

user output
(empty)

Test 169

Group: 7, 9

Verdict:

input
100000 100202
35789 93580
67354 92036
44228 33834
77912 95889
...

correct output
44784308168492

user output
(empty)

Test 170

Group: 7, 9

Verdict:

input
100000 100018
35789 93580
67354 92036
33834 44228
77912 95889
...

correct output
233864569370238

user output
(empty)

Test 171

Group: 7, 9

Verdict:

input
100000 116564
77204 12075
83207 5174
46582 40978
47253 52148
...

correct output
267971160385620

user output
(empty)

Test 172

Group: 7, 9

Verdict:

input
100000 116646
51687 31040
7707 85869
45370 19396
50452 34762
...

correct output
179579982423918

user output
(empty)

Test 173

Group: 7, 9

Verdict:

input
100000 119976
25826 12180
95416 90726
72716 87791
45058 76505
...

correct output
270041858823462

user output
(empty)

Test 174

Group: 7, 9

Verdict:

input
100000 120074
33818 57263
16742 60018
92173 31648
82867 66109
...

correct output
179604474330060

user output
(empty)

Test 175

Group: 7, 9

Verdict:

input
100000 119933
65686 19039
57997 30001
4206 70270
34887 65561
...

correct output
390729023616

user output
(empty)

Test 176

Group: 7, 9

Verdict:

input
100000 120041
97770 16202
15817 85323
17923 95338
88267 90866
...

correct output
166285311478

user output
(empty)

Test 177

Group: 7, 9

Verdict:

input
100000 120030
88092 27847
18720 34781
99310 30108
57179 42406
...

correct output
95531982128

user output
(empty)

Test 178

Group: 7, 9

Verdict:

input
100000 110072
93278 66066
59456 22206
49504 91860
66275 65561
...

correct output
11451196

user output
(empty)

Test 179

Group: 7, 9

Verdict:

input
100000 100045
5597 40554
1053 25306
92465 85561
85910 27472
...

correct output
2752008

user output
(empty)

Test 180

Group: 7, 9

Verdict:

input
100000 116564
77204 64268
83207 64268
64268 40978
47253 52148
...

correct output
31609400540

user output
(empty)

Test 181

Group: 7, 9

Verdict:

input
100000 116526
9758 91525
5176 42907
84212 57429
25440 18500
...

correct output
41003713054

user output
(empty)

Test 182

Group: 7, 9

Verdict:

input
100000 119976
25826 64268
64268 90726
72716 64268
45058 76505
...

correct output
37940802096

user output
(empty)

Test 183

Group: 7, 9

Verdict:

input
100000 120013
66535 59698
226 42907
42907 69826
23264 91354
...

correct output
49736286866

user output
(empty)

Test 184

Group: 3, 4, 5, 6, 7, 8, 9

Verdict: ACCEPTED

input
1000 1
213 480

correct output
0

user output
0

Test 185

Group: 4, 5, 6, 7, 8, 9

Verdict: ACCEPTED

input
1000 500
825 752
102 974
102 213
436 489
...

correct output
292286

user output
292286

Test 186

Group: 8, 9

Verdict:

input
1000 1000
89 983
751 38
201 34
39 841
...

correct output
304436622

user output
(empty)

Test 187

Group: 8, 9

Verdict:

input
1000 1500
607 544
443 218
61 335
979 539
...

correct output
691398892

user output
(empty)

Test 188

Group: 8, 9

Verdict:

input
1000 2000
170 906
623 727
489 101
775 683
...

correct output
880074628

user output
(empty)

Test 189

Group: 8, 9

Verdict:

input
1000 732
6 7
11 13
16 17
16 18
...

correct output
3042

user output
(empty)

Test 190

Group: 8, 9

Verdict:

input
1000 932
1 5
2 5
3 4
6 7
...

correct output
5500

user output
(empty)

Test 191

Group: 8, 9

Verdict:

input
1000 996
2 3
3 4
3 5
6 7
...

correct output
6528

user output
(empty)

Test 192

Group: 8, 9

Verdict:

input
1000 1068
1 5
2 3
2 5
4 5
...

correct output
7304

user output
(empty)

Test 193

Group: 8, 9

Verdict:

input
1000 1204
2 4
3 5
4 5
6 7
...

correct output
8712

user output
(empty)

Test 194

Group: 8, 9

Verdict:

input
120 188
1 5
2 4
2 5
3 4
...

correct output
1314

user output
(empty)

Test 195

Group: 8, 9

Verdict:

input
1000 1340
214 586
520 44
662 345
858 722
...

correct output
10333142

user output
(empty)

Test 196

Group: 8, 9

Verdict:

input
1000 1291
575 667
76 117
373 710
952 40
...

correct output
20227602

user output
(empty)

Test 197

Group: 8, 9

Verdict:

input
1000 1122
775 416
293 872
617 173
498 414
...

correct output
58161678

user output
(empty)

Test 198

Group: 8, 9

Verdict:

input
1000 1063
54 858
623 333
677 99
782 977
...

correct output
104589738

user output
(empty)

Test 199

Group: 8, 9

Verdict:

input
1000 1043
914 355
270 870
927 430
349 351
...

correct output
137024626

user output
(empty)

Test 200

Group: 8, 9

Verdict:

input
1000 1003
306 494
799 203
258 597
903 283
...

correct output
531880508

user output
(empty)

Test 201

Group: 8, 9

Verdict:

input
1000 1001
306 494
363 13
228 258
903 283
...

correct output
833480642

user output
(empty)

Test 202

Group: 8, 9

Verdict:

input
1000 1392
623 537
302 53
97 496
429 84
...

correct output
232898122

user output
(empty)

Test 203

Group: 8, 9

Verdict:

input
999 1396
607 910
658 151
888 320
263 517
...

correct output
165648180

user output
(empty)

Test 204

Group: 8, 9

Verdict:

input
999 1334
590 803
337 779
576 213
611 356
...

correct output
21845616

user output
(empty)

Test 205

Group: 8, 9

Verdict:

input
1000 1328
301 575
556 586
225 308
268 792
...

correct output
6020512

user output
(empty)

Test 206

Group: 8, 9

Verdict:

input
999 1323
810 88
566 261
496 401
150 857
...

correct output
6071912

user output
(empty)

Test 207

Group: 8, 9

Verdict:

input
1000 1205
879 344
339 784
675 158
36 284
...

correct output
80682

user output
(empty)

Test 208

Group: 8, 9

Verdict:

input
1000 1066
914 355
155 959
864 651
299 257
...

correct output
19174

user output
(empty)

Test 209

Group: 8, 9

Verdict:

input
1000 1392
623 967
650 53
97 964
967 84
...

correct output
5588940

user output
(empty)

Test 210

Group: 8, 9

Verdict:

input
1000 1391
333 454
348 88
644 357
650 425
...

correct output
8939450

user output
(empty)

Test 211

Group: 3, 5, 7, 9

Verdict: ACCEPTED

input
100000 1
63256 2863

correct output
0

user output
0

Test 212

Group: 7, 9

Verdict:

input
100000 50000
60805 30033
95781 86796
70843 69873
51813 93953
...

correct output
2742223754

user output
(empty)

Test 213

Group: 9

Verdict:

input
100000 100000
13036 23902
71466 9482
98728 78471
22915 2470
...

correct output
300978371408450

user output
(empty)

Test 214

Group: 9

Verdict:

input
100000 150000
96892 28186
36646 86342
39732 98411
34908 56085
...

correct output
683747420307438

user output
(empty)

Test 215

Group: 9

Verdict:

input
100000 200000
76254 3366
37155 63474
21986 10015
51756 81588
...

correct output
865774160562120

user output
(empty)

Test 216

Group: 9

Verdict:

input
99996 116077
7 8
13 15
19 20
19 21
...

correct output
1219822

user output
(empty)

Test 217

Group: 9

Verdict:

input
96612 129683
1 3
1 5
1 6
2 6
...

correct output
1460498

user output
(empty)

Test 218

Group: 9

Verdict:

input
100000 133328
56342 56213
94446 30251
93277 7906
82979 44767
...

correct output
183334336866

user output
(empty)

Test 219

Group: 9

Verdict:

input
100000 129966
45510 45301
74998 14447
76575 80598
70873 577
...

correct output
368166724456

user output
(empty)

Test 220

Group: 9

Verdict:

input
100000 112401
76043 86339
90791 45318
9396 37046
94969 93269
...

correct output
1160447409644

user output
(empty)

Test 221

Group: 9

Verdict:

input
100000 106480
30734 93100
59595 93637
94525 22314
32468 49900
...

correct output
2390387694872

user output
(empty)

Test 222

Group: 9

Verdict:

input
100000 103870
17687 45854
15282 82728
13395 99385
58277 95812
...

correct output
3980345340248

user output
(empty)

Test 223

Group: 9

Verdict:

input
100000 100407
18412 84617
17800 86459
34907 46819
26170 28908
...

correct output
25859846663344

user output
(empty)

Test 224

Group: 9

Verdict:

input
100000 100018
99088 35369
51940 33653
63209 30720
81941 2254
...

correct output
245732789117166

user output
(empty)

Test 225

Group: 9

Verdict:

input
100000 139986
70134 40161
53574 94783
25494 65315
93490 22247
...

correct output
238120551021732

user output
(empty)

Test 226

Group: 9

Verdict:

input
100000 139976
24084 82436
82856 54009
66478 73212
34938 561
...

correct output
159594995569070

user output
(empty)

Test 227

Group: 9

Verdict:

input
99999 133258
46364 64951
24665 65966
9793 12133
34476 49490
...

correct output
203420416652

user output
(empty)

Test 228

Group: 9

Verdict:

input
100000 133344
91799 79467
84307 46548
71903 94155
59187 6657
...

correct output
132509193924

user output
(empty)

Test 229

Group: 9

Verdict:

input
100000 133319
58459 13864
58342 77677
39390 75885
63014 64569
...

correct output
108164727002

user output
(empty)

Test 230

Group: 9

Verdict:

input
100000 119924
96693 22400
54378 47771
69590 43017
45963 89616
...

correct output
10068954

user output
(empty)

Test 231

Group: 9

Verdict:

input
100000 106598
11660 95724
61853 35905
54902 93490
62870 73129
...

correct output
1794514

user output
(empty)

Test 232

Group: 9

Verdict:

input
100000 139986
64268 40161
53574 94783
25494 66535
93490 66535
...

correct output
55345960160

user output
(empty)

Test 233

Group: 9

Verdict:

input
100000 140001
43272 66535
25078 12503
27844 46511
88566 80658
...

correct output
94357413360

user output
(empty)