CSES - Leirikisa 3 - Results
Submission details
Task:Joker
Sender:DualRed
Submission time:2023-04-19 17:26:38 +0300
Language:C++ (C++20)
Status:READY
Result:6
Feedback
groupverdictscore
#1ACCEPTED6
#20
#30
#40
#50
#60
Test results
testverdicttimegroup
#1ACCEPTED0.00 s1, 2, 4, 5, 6details
#2ACCEPTED0.00 s1, 2, 3, 4, 5, 6details
#3ACCEPTED0.00 s1, 2, 4, 5, 6details
#4ACCEPTED0.00 s1, 2, 4, 5, 6details
#5ACCEPTED0.00 s1, 2, 3, 4, 5, 6details
#6ACCEPTED0.00 s2, 4, 5, 6details
#70.00 s2, 4, 5, 6details
#80.00 s2, 4, 5, 6details
#90.00 s2, 4, 5, 6details
#100.00 s2, 4, 5, 6details
#110.00 s2, 4, 5, 6details
#120.00 s2, 4, 5, 6details
#130.00 s2, 4, 5, 6details
#140.00 s2, 4, 5, 6details
#150.00 s2, 4, 5, 6details
#160.00 s2, 4, 5, 6details
#170.00 s2, 4, 5, 6details
#180.00 s2, 4, 5, 6details
#190.00 s2, 4, 5, 6details
#200.00 s2, 4, 5, 6details
#210.00 s2, 4, 5, 6details
#220.00 s2, 4, 5, 6details
#230.00 s2, 4, 5, 6details
#240.00 s2, 4, 5, 6details
#250.00 s2, 4, 5, 6details
#260.00 s2, 4, 5, 6details
#270.00 s2, 4, 5, 6details
#280.00 s2, 4, 5, 6details
#290.00 s2, 5, 6details
#300.00 s2, 5, 6details
#310.00 s2, 5, 6details
#320.00 s2, 5, 6details
#330.00 s2, 5, 6details
#340.00 s2, 5, 6details
#350.00 s2, 5, 6details
#360.00 s2, 5, 6details
#370.00 s2, 5, 6details
#380.00 s2, 5, 6details
#390.00 s2, 5, 6details
#400.00 s2, 5, 6details
#410.00 s2, 5, 6details
#420.00 s2, 5, 6details
#430.00 s2, 5, 6details
#440.00 s2, 5, 6details
#450.00 s2, 5, 6details
#460.00 s2, 5, 6details
#470.00 s2, 5, 6details
#480.00 s2, 5, 6details
#490.00 s2, 5, 6details
#500.00 s2, 5, 6details
#510.00 s2, 5, 6details
#520.00 s2, 5, 6details
#530.00 s2, 5, 6details
#540.00 s2, 5, 6details
#550.00 s3, 4, 6details
#560.00 s3, 4, 6details
#570.00 s3, 4, 6details
#580.00 s3, 4, 6details
#590.00 s3, 4, 6details
#600.00 s3, 4, 6details
#610.00 s3, 4, 6details
#620.00 s3, 4, 6details
#630.00 s3, 4, 6details
#640.00 s3, 4, 6details
#650.00 s3, 4, 6details
#660.00 s3, 4, 6details
#670.00 s3, 4, 6details
#680.00 s3, 4, 6details
#690.00 s4, 6details
#700.00 s4, 6details
#710.00 s4, 6details
#720.00 s4, 6details
#730.00 s4, 6details
#740.00 s4, 6details
#750.00 s4, 6details
#760.00 s4, 6details
#770.00 s4, 6details
#780.00 s4, 6details
#790.00 s4, 6details
#800.00 s4, 6details
#810.00 s4, 6details
#820.00 s4, 6details
#830.00 s5, 6details
#840.00 s5, 6details
#850.00 s5, 6details
#860.00 s5, 6details
#870.00 s5, 6details
#880.00 s5, 6details
#890.00 s5, 6details
#900.00 s5, 6details
#910.00 s5, 6details
#920.00 s5, 6details
#930.00 s5, 6details
#940.00 s6details
#950.00 s6details
#960.00 s6details
#970.00 s6details
#980.00 s6details
#990.00 s6details
#1000.00 s6details
#1010.00 s6details
#1020.00 s6details
#1030.00 s6details
#1040.00 s6details
#1050.00 s6details
#1060.00 s6details
#1070.00 s6details
#1080.00 s6details
#1090.00 s6details
#1100.00 s6details
#1110.00 s6details
#1120.00 s6details
#1130.00 s6details
#1140.00 s6details
#1150.00 s6details
#1160.00 s6details

Code

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

int N, M, Q;
const int u = 20;
vector<pair<int, int>> v[u];
vector<pair<int, int>> cn;

bool contains(int a1, int a2, int b1, int b2){
    return b1 >= a1 && b2 <= a2;
}

bool bfs(int l, int r){
    vector<int> color(u); 
    vector<int> dep(u);
    for(int i = 1; i <= N; i++){
        if(color[i] != 0) continue;
        queue<pair<int, int>> q;
        q.push(make_pair(i, 0)); color[i] = 1;
        while(q.size() > 0){
            int j = q.front().first; 
            int d = q.front().second;
            q.pop();

            color[j] = 2;
            for(auto p : v[j]){
                if(p.second >= l && p.second <= r) continue;
                if(color[p.first] == 2) continue;
                else if(color[p.first] == 0){
                    q.push(make_pair(p.first, d+1));
                    dep[p.first] = d+1;
                    color[p.first] = 1;
                }
                else if(dep[p.first] == dep[j]) return true;
            }
        }
    }
    return false;
}


bool check(int l, int r){
    vector<vector<int>> visited(2, vector<int>(u));
    for(int i = 1; i <= N; i++){
        if(visited[0][i] || visited[1][i]) continue;
        visited[0][i] = true;

        queue<pair<int, int>> q;
        q.push(make_pair(i, 0));
        while(q.size() > 0){
            int j = q.front().first; 
            int par = q.front().second;
            q.pop();
            visited[par][j] = true;

            for(auto p : v[j]){
                if(p.second >= l && p.second <= r) continue;
                if(!visited[1-par][p.first]){
                    q.push(make_pair(p.first, 1-par));
                    visited[1-par][p.first] = true;
                }
            }
        }
    }
    
    for(int i = 0; i < N; i++){
        for(auto p : v[i]){
            if(p.second >= l && p.second <= r) continue;
            if((visited[0][p.first] && visited[0][i]) || (visited[1][p.first] && visited[1][i])){
                return true;
            }
        }
    }
    return false;
}


int main(){
    cin >> N >> M >> Q;
    for(int i = 1; i <= M; i++){
        int x, y;
        cin >> x >> y;
        v[x].push_back(make_pair(y, i));
        v[y].push_back(make_pair(x, i));
    }

    if(N <= 2000){
        for(int i = 0; i < Q; i++){
            int l, r;
            cin >> l >> r;
            bool b = false;
            for(auto p : cn){
                if(contains(l, r, p.first, p.second)){
                    cout << "NO\n";
                    b = true;
                    break;
                }
            }
            if(b) continue;

            if(check(l, r)) cout << "YES\n";
            else{
                cout << "NO\n";
                cn.push_back(make_pair(l, r));
            }
        }
    }
    else{
        int x = 1;
        for(int step = 1 << 23; step > 0; step /= 2){
            while(x+step <= N && check(1, x+step)) x += step;
        }

        for(int i = 0; i < Q; i++){
            int r, l;
            cin >> l >> r;
            assert(l == 1);
            if(r <= x) cout << "YES\n";
            else cout << "NO\n";
        }
    }

}

Test details

Test 1

Group: 1, 2, 4, 5, 6

Verdict: ACCEPTED

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

correct output
NO
YES

user output
NO
YES

Test 2

Group: 1, 2, 3, 4, 5, 6

Verdict: ACCEPTED

input
2 1 1
1 2
1 1

correct output
NO

user output
NO

Test 3

Group: 1, 2, 4, 5, 6

Verdict: ACCEPTED

input
4 6 6
4 3
1 4
1 3
2 1
...

correct output
YES
YES
YES
YES
YES
...

user output
YES
YES
YES
YES
YES
...

Test 4

Group: 1, 2, 4, 5, 6

Verdict: ACCEPTED

input
3 3 6
1 2
2 3
3 1
1 1
...

correct output
NO
NO
NO
NO
NO
...

user output
NO
NO
NO
NO
NO
...

Test 5

Group: 1, 2, 3, 4, 5, 6

Verdict: ACCEPTED

input
4 2 1
2 3
1 4
1 2

correct output
NO

user output
NO

Test 6

Group: 2, 4, 5, 6

Verdict: ACCEPTED

input
5 7 28
1 2
2 3
3 4
4 5
...

correct output
YES
NO
NO
YES
YES
...

user output
YES
NO
NO
YES
YES
...
Truncated

Test 7

Group: 2, 4, 5, 6

Verdict:

input
200 100 200
69 122
135 163
115 132
191 194
...

correct output
NO
NO
NO
NO
NO
...

user output
(empty)

Test 8

Group: 2, 4, 5, 6

Verdict:

input
200 180 200
93 196
44 163
35 88
132 184
...

correct output
YES
NO
YES
NO
YES
...

user output
(empty)

Error:
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc

Test 9

Group: 2, 4, 5, 6

Verdict:

input
160 200 200
2 149
7 94
80 122
26 123
...

correct output
YES
YES
NO
YES
YES
...

user output
(empty)

Error:
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc

Test 10

Group: 2, 4, 5, 6

Verdict:

input
100 200 200
52 54
28 29
56 81
61 79
...

correct output
YES
YES
YES
NO
YES
...

user output
(empty)

Test 11

Group: 2, 4, 5, 6

Verdict:

input
200 198 200
66 140
127 142
6 96
21 26
...

correct output
NO
YES
YES
NO
YES
...

user output
(empty)

Test 12

Group: 2, 4, 5, 6

Verdict:

input
200 200 200
78 96
145 186
169 180
20 132
...

correct output
NO
NO
YES
NO
YES
...

user output
(empty)

Test 13

Group: 2, 4, 5, 6

Verdict:

input
100 197 200
79 64
64 5
27 5
19 27
...

correct output
YES
YES
NO
YES
NO
...

user output
(empty)

Test 14

Group: 2, 4, 5, 6

Verdict:

input
200 200 200
45 64
11 45
137 45
39 137
...

correct output
NO
NO
NO
NO
NO
...

user output
(empty)

Test 15

Group: 2, 4, 5, 6

Verdict:

input
200 200 200
29 194
138 194
176 194
29 96
...

correct output
YES
NO
NO
NO
NO
...

user output
(empty)

Test 16

Group: 2, 4, 5, 6

Verdict:

input
180 200 200
162 102
162 93
76 162
93 21
...

correct output
NO
YES
NO
NO
NO
...

user output
(empty)

Test 17

Group: 2, 4, 5, 6

Verdict:

input
100 198 200
13 28
50 81
50 33
30 50
...

correct output
NO
YES
NO
NO
NO
...

user output
(empty)

Test 18

Group: 2, 4, 5, 6

Verdict:

input
100 198 200
79 11
29 54
77 79
29 52
...

correct output
YES
YES
NO
YES
YES
...

user output
(empty)

Test 19

Group: 2, 4, 5, 6

Verdict:

input
100 198 200
19 28
36 28
19 74
28 69
...

correct output
NO
YES
YES
YES
NO
...

user output
(empty)

Test 20

Group: 2, 4, 5, 6

Verdict:

input
60 200 200
27 9
49 14
32 55
43 37
...

correct output
YES
YES
YES
YES
YES
...

user output
(empty)

Test 21

Group: 2, 4, 5, 6

Verdict:

input
100 200 200
49 9
56 1
30 90
16 83
...

correct output
YES
YES
YES
YES
YES
...

user output
(empty)

Test 22

Group: 2, 4, 5, 6

Verdict:

input
160 200 200
2 43
123 53
139 89
83 74
...

correct output
YES
YES
NO
YES
YES
...

user output
(empty)

Test 23

Group: 2, 4, 5, 6

Verdict:

input
80 200 200
31 30
30 34
34 78
30 39
...

correct output
NO
YES
YES
YES
YES
...

user output
(empty)

Test 24

Group: 2, 4, 5, 6

Verdict:

input
100 200 200
65 96
66 47
90 54
82 58
...

correct output
YES
YES
NO
NO
YES
...

user output
(empty)

Test 25

Group: 2, 4, 5, 6

Verdict:

input
140 200 200
122 139
11 122
122 5
98 60
...

correct output
NO
YES
YES
NO
NO
...

user output
(empty)

Test 26

Group: 2, 4, 5, 6

Verdict:

input
70 200 200
53 23
34 54
69 70
67 54
...

correct output
YES
YES
YES
YES
NO
...

user output
(empty)

Test 27

Group: 2, 4, 5, 6

Verdict:

input
100 200 200
49 9
56 1
30 90
16 83
...

correct output
YES
YES
NO
NO
YES
...

user output
(empty)

Test 28

Group: 2, 4, 5, 6

Verdict:

input
150 200 200
109 146
18 36
126 149
66 148
...

correct output
NO
NO
NO
NO
NO
...

user output
(empty)

Test 29

Group: 2, 5, 6

Verdict:

input
2000 1000 2000
143 636
1758 229
68 948
489 540
...

correct output
NO
NO
NO
NO
NO
...

user output
(empty)

Error:
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc

Test 30

Group: 2, 5, 6

Verdict:

input
2000 1800 2000
659 1154
595 155
287 1279
1180 901
...

correct output
YES
YES
YES
NO
YES
...

user output
(empty)

Test 31

Group: 2, 5, 6

Verdict:

input
1600 2000 2000
1066 1409
222 91
158 1229
1216 1261
...

correct output
YES
NO
YES
YES
YES
...

user output
(empty)

Error:
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc

Test 32

Group: 2, 5, 6

Verdict:

input
1000 2000 2000
518 425
290 35
488 578
839 851
...

correct output
YES
YES
YES
YES
YES
...

user output
(empty)

Test 33

Group: 2, 5, 6

Verdict:

input
600 2000 2000
443 180
504 440
477 573
469 521
...

correct output
YES
NO
YES
NO
YES
...

user output
(empty)

Test 34

Group: 2, 5, 6

Verdict:

input
2000 1998 2000
1055 64
1073 677
1840 1258
269 278
...

correct output
YES
NO
NO
YES
YES
...

user output
(empty)

Test 35

Group: 2, 5, 6

Verdict:

input
2000 2000 2000
501 709
445 921
928 1130
929 1580
...

correct output
YES
NO
NO
YES
YES
...

user output
(empty)

Error:
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc

Test 36

Group: 2, 5, 6

Verdict:

input
1000 1997 2000
306 556
306 275
275 163
297 163
...

correct output
NO
NO
NO
YES
YES
...

user output
(empty)

Test 37

Group: 2, 5, 6

Verdict:

input
2000 2000 2000
1114 1853
1841 1853
1853 1255
1114 348
...

correct output
NO
YES
YES
YES
NO
...

user output
(empty)

Test 38

Group: 2, 5, 6

Verdict:

input
2000 2000 2000
1773 1949
1306 1773
1128 1949
1051 1306
...

correct output
NO
NO
NO
NO
NO
...

user output
(empty)

Test 39

Group: 2, 5, 6

Verdict:

input
1800 2000 2000
436 988
767 988
988 925
1172 436
...

correct output
NO
YES
YES
NO
YES
...

user output
(empty)

Test 40

Group: 2, 5, 6

Verdict:

input
1000 1998 2000
817 270
270 805
270 56
218 56
...

correct output
YES
NO
YES
YES
YES
...

user output
(empty)

Test 41

Group: 2, 5, 6

Verdict:

input
1000 1998 2000
329 599
599 401
647 587
198 647
...

correct output
NO
YES
YES
YES
YES
...

user output
(empty)

Test 42

Group: 2, 5, 6

Verdict:

input
1000 1998 2000
419 351
426 351
419 190
352 351
...

correct output
NO
NO
NO
YES
NO
...

user output
(empty)

Test 43

Group: 2, 5, 6

Verdict:

input
600 2000 2000
3 349
91 297
93 343
242 543
...

correct output
YES
YES
YES
YES
YES
...

user output
(empty)

Test 44

Group: 2, 5, 6

Verdict:

input
1000 2000 2000
51 986
197 724
841 692
579 588
...

correct output
YES
YES
YES
YES
YES
...

user output
(empty)

Test 45

Group: 2, 5, 6

Verdict:

input
1600 2000 2000
709 949
872 990
1275 404
717 831
...

correct output
YES
YES
YES
YES
NO
...

user output
(empty)

Test 46

Group: 2, 5, 6

Verdict:

input
2000 2000 2000
898 644
806 1970
97 229
1226 1959
...

correct output
YES
YES
YES
YES
YES
...

user output
(empty)

Error:
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc

Test 47

Group: 2, 5, 6

Verdict:

input
800 2000 2000
313 79
616 496
150 79
150 264
...

correct output
YES
YES
YES
YES
YES
...

user output
(empty)

Test 48

Group: 2, 5, 6

Verdict:

input
1000 2000 2000
787 584
671 787
221 787
356 671
...

correct output
YES
NO
NO
YES
YES
...

user output
(empty)

Error:
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc

Test 49

Group: 2, 5, 6

Verdict:

input
1400 2000 2000
476 224
224 192
224 370
453 110
...

correct output
YES
YES
YES
NO
YES
...

user output
(empty)

Test 50

Group: 2, 5, 6

Verdict:

input
2000 2000 2000
1841 1868
1868 279
1667 1703
942 1151
...

correct output
YES
NO
NO
YES
YES
...

user output
(empty)

Test 51

Group: 2, 5, 6

Verdict:

input
700 2000 2000
423 66
466 83
60 427
315 558
...

correct output
YES
YES
YES
YES
YES
...

user output
(empty)

Test 52

Group: 2, 5, 6

Verdict:

input
1000 2000 2000
51 986
197 724
841 692
579 588
...

correct output
YES
NO
NO
YES
YES
...

user output
(empty)

Test 53

Group: 2, 5, 6

Verdict:

input
1400 2000 2000
1025 1164
10 456
713 1309
923 976
...

correct output
NO
NO
YES
YES
YES
...

user output
(empty)

Test 54

Group: 2, 5, 6

Verdict:

input
2000 2000 2000
898 644
806 1970
97 229
1226 1959
...

correct output
YES
YES
NO
YES
YES
...

user output
(empty)

Error:
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc

Test 55

Group: 3, 4, 6

Verdict:

input
100000 199997 200000
79109 44896
79109 66117
66117 91800
91800 24387
...

correct output
NO
NO
YES
NO
NO
...

user output
(empty)

Test 56

Group: 3, 4, 6

Verdict:

input
200000 200000 200000
156700 169748
169748 15408
158166 15408
117779 158166
...

correct output
NO
NO
NO
NO
NO
...

user output
(empty)

Test 57

Group: 3, 4, 6

Verdict:

input
180000 200000 200000
95819 27342
123468 27342
95819 45980
95819 36699
...

correct output
NO
NO
NO
NO
YES
...

user output
(empty)

Test 58

Group: 3, 4, 6

Verdict:

input
100000 199998 200000
87308 6340
6340 65354
52754 87308
88178 52754
...

correct output
NO
NO
YES
NO
NO
...

user output
(empty)

Test 59

Group: 3, 4, 6

Verdict:

input
100000 199998 200000
28343 15804
28343 94432
28343 23326
59830 23326
...

correct output
YES
NO
NO
NO
NO
...

user output
(empty)

Test 60

Group: 3, 4, 6

Verdict:

input
60000 200000 200000
47535 59290
4275 37708
43568 37576
957 18676
...

correct output
YES
NO
YES
YES
YES
...

user output
(empty)

Test 61

Group: 3, 4, 6

Verdict:

input
100000 200000 200000
77786 6752
26401 60048
31910 17910
65779 52734
...

correct output
YES
YES
YES
NO
YES
...

user output
(empty)

Test 62

Group: 3, 4, 6

Verdict:

input
200000 200000 200000
197731 68719
145501 57647
34483 149695
62098 31160
...

correct output
NO
YES
YES
YES
YES
...

user output
(empty)

Test 63

Group: 3, 4, 6

Verdict:

input
100000 200000 200000
91199 7467
35612 91199
7467 3610
7467 7468
...

correct output
NO
NO
NO
NO
NO
...

user output
(empty)

Test 64

Group: 3, 4, 6

Verdict:

input
180000 200000 200000
48044 116141
149941 97532
108024 153885
48044 164680
...

correct output
NO
NO
NO
NO
NO
...

user output
(empty)

Test 65

Group: 3, 4, 6

Verdict:

input
20000 200000 200000
17080 3271
6065 5381
7484 15940
18311 3140
...

correct output
NO
NO
NO
YES
YES
...

user output
(empty)

Test 66

Group: 3, 4, 6

Verdict:

input
60000 200000 200000
47535 59290
4275 37708
43568 37576
957 18676
...

correct output
NO
NO
NO
NO
NO
...

user output
(empty)

Test 67

Group: 3, 4, 6

Verdict:

input
140000 200000 200000
76834 9131
135811 73947
77276 137710
49994 104785
...

correct output
NO
NO
NO
NO
NO
...

user output
(empty)

Test 68

Group: 3, 4, 6

Verdict:

input
200000 200000 200000
197731 68719
145501 57647
34483 149695
62098 31160
...

correct output
NO
NO
NO
NO
NO
...

user output
(empty)

Test 69

Group: 4, 6

Verdict:

input
100000 199997 200000
1304 38053
86107 1304
68527 86107
68527 1612
...

correct output
YES
YES
YES
YES
NO
...

user output
(empty)

Test 70

Group: 4, 6

Verdict:

input
200000 200000 200000
148591 58374
61708 58374
107489 148591
58374 23155
...

correct output
NO
NO
NO
NO
NO
...

user output
(empty)

Test 71

Group: 4, 6

Verdict:

input
200000 200000 200000
24977 29213
29213 75265
24977 127189
29213 3381
...

correct output
NO
NO
NO
NO
NO
...

user output
(empty)

Test 72

Group: 4, 6

Verdict:

input
100000 199998 200000
57254 12810
63850 12810
63850 89790
65809 57254
...

correct output
NO
NO
YES
YES
YES
...

user output
(empty)

Test 73

Group: 4, 6

Verdict:

input
100000 199998 200000
26113 11559
11559 63846
54714 63846
54714 56676
...

correct output
NO
NO
YES
YES
NO
...

user output
(empty)

Test 74

Group: 4, 6

Verdict:

input
100000 200000 200000
33031 34423
72848 8710
88459 18732
47047 18041
...

correct output
YES
YES
YES
YES
YES
...

user output
(empty)

Test 75

Group: 4, 6

Verdict:

input
200000 200000 200000
73795 17417
118651 109547
126011 10896
168828 105443
...

correct output
YES
YES
NO
YES
YES
...

user output
(empty)

Test 76

Group: 4, 6

Verdict:

input
80000 200000 200000
52483 73143
12669 52483
12669 8801
7139 12669
...

correct output
NO
NO
NO
NO
NO
...

user output
(empty)

Test 77

Group: 4, 6

Verdict:

input
140000 200000 200000
115169 81535
15641 81535
38682 88868
88868 47530
...

correct output
NO
NO
NO
NO
NO
...

user output
(empty)

Test 78

Group: 4, 6

Verdict:

input
200000 200000 200000
153594 37468
37468 137788
153594 41543
24238 137788
...

correct output
NO
NO
NO
NO
NO
...

user output
(empty)

Test 79

Group: 4, 6

Verdict:

input
20000 200000 200000
17870 8070
314 17528
15457 1740
5756 18694
...

correct output
NO
NO
YES
YES
YES
...

user output
(empty)

Test 80

Group: 4, 6

Verdict:

input
80000 200000 200000
28304 58231
29083 69789
14754 22589
69030 61874
...

correct output
YES
NO
NO
YES
NO
...

user output
(empty)

Test 81

Group: 4, 6

Verdict:

input
140000 200000 200000
29859 87758
94054 99173
133408 3634
54847 66313
...

correct output
NO
NO
YES
NO
NO
...

user output
(empty)

Test 82

Group: 4, 6

Verdict:

input
200000 200000 200000
73795 17417
118651 109547
126011 10896
168828 105443
...

correct output
NO
NO
NO
NO
NO
...

user output
(empty)

Test 83

Group: 5, 6

Verdict:

input
100000 199997 2000
21350 43930
21350 51098
51098 26100
94005 26100
...

correct output
YES
YES
YES
NO
YES
...

user output
(empty)

Test 84

Group: 5, 6

Verdict:

input
200000 200000 2000
55606 76199
55815 55606
55815 36066
76199 174168
...

correct output
NO
NO
NO
NO
NO
...

user output
(empty)

Test 85

Group: 5, 6

Verdict:

input
180000 200000 2000
30628 123063
33359 123063
54359 33359
77025 30628
...

correct output
YES
NO
NO
NO
NO
...

user output
(empty)

Test 86

Group: 5, 6

Verdict:

input
100000 199998 2000
15682 7176
97125 15682
88372 15682
50486 88372
...

correct output
YES
YES
YES
YES
NO
...

user output
(empty)

Test 87

Group: 5, 6

Verdict:

input
100000 200000 2000
2053 52512
72237 51890
36516 44970
5069 56817
...

correct output
YES
YES
YES
YES
YES
...

user output
(empty)

Test 88

Group: 5, 6

Verdict:

input
160000 200000 2000
21325 120479
111827 43950
90917 129723
58746 139778
...

correct output
YES
YES
YES
YES
YES
...

user output
(empty)

Test 89

Group: 5, 6

Verdict:

input
100000 200000 2000
18402 13988
47976 18402
62940 75386
55632 34981
...

correct output
NO
YES
NO
YES
YES
...

user output
(empty)

Test 90

Group: 5, 6

Verdict:

input
180000 200000 2000
152829 48590
16999 12709
14957 104250
44652 4736
...

correct output
YES
YES
NO
YES
YES
...

user output
(empty)

Test 91

Group: 5, 6

Verdict:

input
40000 200000 2000
38468 36912
4542 19750
6811 29314
27076 39678
...

correct output
NO
YES
YES
YES
NO
...

user output
(empty)

Test 92

Group: 5, 6

Verdict:

input
120000 200000 2000
76623 32935
22176 104247
73526 57366
79316 28465
...

correct output
NO
YES
NO
YES
YES
...

user output
(empty)

Test 93

Group: 5, 6

Verdict:

input
180000 200000 2000
163160 179523
150467 20024
142555 159160
144809 137058
...

correct output
NO
NO
YES
YES
YES
...

user output
(empty)

Test 94

Group: 6

Verdict:

input
100000 199997 200000
38128 66420
66420 60899
1610 60899
1610 33938
...

correct output
YES
YES
YES
YES
YES
...

user output
(empty)

Test 95

Group: 6

Verdict:

input
200000 200000 200000
124811 102683
102683 199122
199122 103485
188442 199122
...

correct output
NO
NO
NO
NO
NO
...

user output
(empty)

Test 96

Group: 6

Verdict:

input
180000 200000 200000
136365 38111
136365 16783
38111 97139
38111 65820
...

correct output
NO
NO
NO
NO
YES
...

user output
(empty)

Test 97

Group: 6

Verdict:

input
100000 199998 200000
47356 73979
73979 8588
47356 37939
47356 81210
...

correct output
NO
YES
YES
NO
YES
...

user output
(empty)

Test 98

Group: 6

Verdict:

input
100000 199998 200000
13259 67698
85729 67698
56820 16929
6270 67698
...

correct output
YES
NO
NO
YES
YES
...

user output
(empty)

Test 99

Group: 6

Verdict:

input
60000 200000 200000
27999 5325
9310 9073
52595 16882
48306 42092
...

correct output
YES
YES
YES
YES
YES
...

user output
(empty)

Test 100

Group: 6

Verdict:

input
200000 200000 200000
78200 98410
163318 67465
8912 190609
196395 1013
...

correct output
YES
YES
YES
YES
YES
...

user output
(empty)

Test 101

Group: 6

Verdict:

input
80000 200000 200000
21823 75214
75214 1828
13688 75214
13688 51809
...

correct output
YES
NO
YES
YES
YES
...

user output
(empty)

Test 102

Group: 6

Verdict:

input
140000 200000 200000
10906 118618
54603 91292
124052 91292
119049 3648
...

correct output
NO
YES
NO
YES
NO
...

user output
(empty)

Test 103

Group: 6

Verdict:

input
200000 200000 200000
111106 17201
186387 66381
94838 66381
66381 20038
...

correct output
NO
NO
YES
YES
NO
...

user output
(empty)

Test 104

Group: 6

Verdict:

input
40000 200000 200000
16506 16413
27962 10869
12617 17847
18044 29345
...

correct output
YES
NO
YES
YES
YES
...

user output
(empty)

Test 105

Group: 6

Verdict:

input
120000 200000 200000
37515 111022
81478 63273
50485 39379
110275 81603
...

correct output
NO
NO
NO
YES
YES
...

user output
(empty)

Test 106

Group: 6

Verdict:

input
180000 200000 200000
149953 57831
12605 76457
64986 60399
163005 26571
...

correct output
YES
YES
YES
YES
YES
...

user output
(empty)

Test 107

Group: 6

Verdict:

input
200000 200000 200000
200000 199999
200000 199998
200000 199997
200000 199996
...

correct output
NO
NO
NO
NO
NO
...

user output
(empty)

Test 108

Group: 6

Verdict:

input
100000 199997 200000
51406 76346
63399 51406
47898 63399
52054 47898
...

correct output
NO
NO
NO
NO
YES
...

user output
(empty)

Test 109

Group: 6

Verdict:

input
100000 199997 200000
66606 15369
53125 15369
19540 53125
19540 39394
...

correct output
YES
NO
NO
NO
NO
...

user output
(empty)

Test 110

Group: 6

Verdict:

input
100000 199997 200000
89099 26457
34984 26457
34984 25294
25294 70035
...

correct output
NO
NO
YES
NO
NO
...

user output
(empty)

Test 111

Group: 6

Verdict:

input
100000 199997 200000
6269 88456
6269 16431
16431 51635
95716 51635
...

correct output
NO
YES
NO
NO
NO
...

user output
(empty)

Test 112

Group: 6

Verdict:

input
100000 199997 200000
3690 43516
3690 8026
8026 20010
67739 20010
...

correct output
NO
NO
NO
NO
YES
...

user output
(empty)

Test 113

Group: 6

Verdict:

input
100000 199997 200000
81926 57062
40079 57062
40079 52801
91378 52801
...

correct output
NO
NO
NO
NO
NO
...

user output
(empty)

Test 114

Group: 6

Verdict:

input
100000 199997 200000
64988 17571
59728 64988
59728 2912
2912 8714
...

correct output
YES
NO
NO
NO
NO
...

user output
(empty)

Test 115

Group: 6

Verdict:

input
100000 199997 200000
93082 74187
41737 93082
33022 41737
33022 11540
...

correct output
NO
NO
NO
NO
YES
...

user output
(empty)

Test 116

Group: 6

Verdict:

input
100000 199997 200000
68165 40704
90353 68165
90353 90452
90452 91454
...

correct output
NO
NO
NO
NO
NO
...

user output
(empty)