QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#213102#3873. TowersLynkcat29 656ms191788kbC++202.1kb2023-10-14 11:57:222023-10-14 11:57:22

Judging History

This is the latest submission verdict.

  • [2023-10-14 11:57:22]
  • Judged
  • Verdict: 29
  • Time: 656ms
  • Memory: 191788kb
  • [2023-10-14 11:57:22]
  • Submitted

answer

#include<bits/stdc++.h>
#define poly vector<int>
#define IOS ios::sync_with_stdio(false)
#define ll long long
#define mp make_pair
#define mt make_tuple
#define pa pair < int,int >
#define fi first
#define se second
#define inf 1e18
#define mod 998244353
#define sz(x) ((int)((x).size()))
#define int ll
// #define N 
using namespace std;
const int Lim=1000000,N=1000005;
int n,x[N],y[N];
poly G[N];
int L[N],R[N];
int ans[N];
set<int>S[N];
queue<int>q;
int tot=0;
int ins[N];
inline void chk(int i)
{
    if (S[i].size()>=3) 
    {
        if (!ins[i]) ins[i]=1,q.push(i),tot++;
    }
}
inline void recalc(int i)
{
    if (L[i]>R[i]) return;
    S[y[G[i][L[i]]]].insert(i);chk(y[G[i][L[i]]]);
    S[y[G[i][R[i]]]].insert(i);chk(y[G[i][R[i]]]);
}
void BellaKira()
{
    cin>>n;
    for (int i=1;i<=n;i++)
    {
        cin>>x[i]>>y[i];
        G[x[i]].push_back(i);
    }
    for (int i=1;i<=Lim;i++)
    {
        sort(G[i].begin(),G[i].end(),[&](int a,int b)
        {
            return y[a]<y[b];
        });
        L[i]=0,R[i]=sz(G[i])-1;
    }
    for (int i=1;i<=Lim;i++) 
    {
        recalc(i);
    }
    while (!q.empty())
    {
        int u=q.front();
        q.pop();
        ins[u]=0;
        if (S[u].size()<=2) continue;
        auto itl=S[u].begin();
        ++itl;
        auto itr=itl;
        poly g;
        while (1)
        {
            ++itr;
            if (itr==S[u].end()) break;
            g.push_back(*itl);
            ++itl;
        }
        S[u].erase(itl,itr);
        for (auto v:g)
        {
            if (y[G[v][R[v]]]==u) R[v]--;
            if (y[G[v][L[v]]]==u) L[v]++; 
            recalc(v);
        }
    }
    for (int i=1;i<=Lim;i++)
        if (L[i]<=R[i]) ans[G[i][L[i]]]=ans[G[i][R[i]]]=1;
    for (int i=1;i<=n;i++)
        cout<<ans[i];
    cout<<'\n';
}
signed main()
{
    IOS;
    cin.tie(0);
    int T=1;
    while (T--)
    {
        BellaKira();
    }
}
/*list:
1.mod 998244353 or 1e9+7 or ???
2.N
3.duipai shuju xingtai duoyidian
...
*/

详细

Subtask #1:

score: 5
Accepted

Test #1:

score: 5
Accepted
time: 11ms
memory: 96028kb

input:

2
869400 218695
664808 31410

output:

11

result:

ok 

Test #2:

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

input:

2
195447 154323
271823 133730

output:

11

result:

ok 

Test #3:

score: 0
Accepted
time: 8ms
memory: 95788kb

input:

3
751594 545975
951568 859051
621150 686048

output:

111

result:

ok 

Test #4:

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

input:

3
404592 259430
770816 43371
147329 582162

output:

111

result:

ok 

Test #5:

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

input:

3
401670 296316
401670 809250
401670 595959

output:

110

result:

ok 

Test #6:

score: 0
Accepted
time: 7ms
memory: 95788kb

input:

3
657802 927690
657802 872623
657802 83083

output:

101

result:

ok 

Test #7:

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

input:

3
759291 185618
759291 386687
759291 100713

output:

011

result:

ok 

Test #8:

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

input:

3
997737 106763
684497 106763
412296 106763

output:

101

result:

ok 

Test #9:

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

input:

3
305388 642835
538743 642835
608034 642835

output:

101

result:

ok 

Test #10:

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

input:

3
420692 202248
784725 202248
931773 202248

output:

101

result:

ok 

Subtask #2:

score: 11
Accepted

Dependency #1:

100%
Accepted

Test #11:

score: 11
Accepted
time: 11ms
memory: 95804kb

input:

16
296455 404592
582162 770816
807435 536085
259430 536085
112538 770816
610915 369095
582162 369095
94860 147329
112538 147329
296455 61932
259430 147329
807435 369095
610915 404592
807435 309191
807435 61932
94860 770816

output:

1111011101101011

result:

ok 

Test #12:

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

input:

16
561476 595959
58474 595959
58474 664431
105001 143086
809250 250085
58474 250085
789588 281386
350332 161786
789588 250085
561476 281386
296316 401670
296316 250085
350332 595959
296316 161786
350332 281386
58474 281386

output:

1011111101101100

result:

ok 

Test #13:

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

input:

16
316904 170612
433799 125553
316904 125553
859728 341680
433799 32398
872623 388831
859728 83083
872623 83083
584763 388831
148042 861814
316904 861814
927690 861814
148042 83083
148042 32398
584763 657802
905375 388831

output:

1111101111010111

result:

ok 

Test #14:

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

input:

16
386687 759291
995919 169567
788489 197826
185618 713079
198743 100713
995919 372561
916765 169567
185618 763504
386687 169567
832084 763504
832084 759291
386687 292594
185618 197826
386687 197826
832084 197826
916765 759291

output:

1100110111001011

result:

ok 

Test #15:

score: 0
Accepted
time: 7ms
memory: 95764kb

input:

16
716236 20497
587980 648488
587980 642779
412708 997737
369271 642779
106763 71182
412708 642779
173374 869560
684497 648488
587980 945118
106763 648488
716236 412296
587980 71182
412708 869560
369271 869560
412708 412296

output:

1001110111111011

result:

ok 

Test #16:

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

input:

16
642835 173421
512014 309394
610395 518804
538743 305388
493101 608034
610395 85927
214511 309394
512014 173421
214511 608034
493101 85927
512014 85927
538743 309394
538743 608034
512014 518804
610395 309394
214511 518804

output:

1011011111001100

result:

ok 

Test #17:

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

input:

16
327159 848430
202248 689260
248917 848430
860732 109812
810547 931773
248917 551698
248917 109812
327159 109812
202248 420692
784725 848430
810547 109812
860732 551698
860732 848430
784725 109812
810547 689260
810547 551698

output:

0111101010001001

result:

ok 

Test #18:

score: 0
Accepted
time: 7ms
memory: 95852kb

input:

16
929868 357006
544399 533307
65980 485996
679846 756501
679846 533307
679846 712386
888311 756501
679846 357006
569069 357006
679846 326645
65980 712386
569069 756501
544399 357006
929868 712386
929868 326645
888311 357006

output:

0110101001111111

result:

ok 

Test #19:

score: 0
Accepted
time: 7ms
memory: 95736kb

input:

16
819172 856879
310900 856879
110339 25925
110339 712188
110339 856879
193758 568642
110339 518110
334829 712188
819172 25925
334829 518110
962527 856879
962527 712188
819172 568642
193758 712188
819172 518110
193758 856879

output:

0010110011111100

result:

ok 

Test #20:

score: 0
Accepted
time: 10ms
memory: 95836kb

input:

16
788180 40074
788180 353457
642341 40074
919317 353457
642341 341228
139346 808233
788180 889183
919317 40074
87340 808233
788180 341228
139346 32374
919317 808233
919317 341228
753883 32374
87340 32374
919317 32374

output:

1010101010010011

result:

ok 

Test #21:

score: 0
Accepted
time: 8ms
memory: 93712kb

input:

16
965515 596717
798876 887533
800289 573487
798876 325675
798876 596717
965515 760793
800289 887533
800289 760793
798876 573487
965515 887533
681117 596717
965515 573487
48193 325675
965515 325675
798876 760793
681117 325675

output:

0110000111101100

result:

ok 

Test #22:

score: 0
Accepted
time: 18ms
memory: 95728kb

input:

16
149212 434288
500896 813986
149212 874409
149212 399513
820463 813986
468173 874409
500781 461669
820463 461669
149212 461669
820463 434288
468173 399513
500896 434288
468173 461669
820463 874409
500896 874409
149212 813986

output:

0111001001111100

result:

ok 

Test #23:

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

input:

16
699564 798118
908277 529562
699564 529562
522034 155145
699564 882739
699564 676309
522034 882739
674634 882739
908277 882739
908277 155145
674634 529562
269930 529562
674634 676309
269930 882739
269930 798118
269930 676309

output:

1011000011011100

result:

ok 

Test #24:

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

input:

16
340926 122845
837654 479692
340926 665346
933317 122845
355500 820776
914026 479692
933317 665346
837654 665346
914026 665346
933317 900289
837654 820776
914026 900289
837654 900289
340926 900289
340926 820776
933317 479692

output:

1101110011100100

result:

ok 

Test #25:

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

input:

16
778218 780821
275288 780821
624040 780821
639375 399191
639375 88034
624040 775928
639375 655766
778218 775928
478222 399191
639375 780821
478222 775928
275288 655766
275288 88034
624040 655766
478222 88034
778218 399191

output:

1100111010101101

result:

ok 

Subtask #3:

score: 7
Accepted

Test #26:

score: 7
Accepted
time: 16ms
memory: 101648kb

input:

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

output:

100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok 

Test #27:

score: 0
Accepted
time: 20ms
memory: 97732kb

input:

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

output:

100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok 

Test #28:

score: 0
Accepted
time: 75ms
memory: 121228kb

input:

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

output:

100000000000000000000000000000000000000000000000000010100000000000000000000000000000000000000000000000001000100000000000000000000000000000000000000000000000100000100000000000000000000000000000000000000000000010000000100000000000000000000000000000000000000000001000000000100000000000000000000000000000...

result:

ok 

Test #29:

score: 0
Accepted
time: 126ms
memory: 141464kb

input:

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

output:

100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok 

Test #30:

score: 0
Accepted
time: 41ms
memory: 106740kb

input:

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

output:

100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010...

result:

ok 

Test #31:

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

input:

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

output:

100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000101000000000000000000000000000000000000...

result:

ok 

Test #32:

score: 0
Accepted
time: 71ms
memory: 119932kb

input:

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

output:

100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok 

Test #33:

score: 0
Accepted
time: 73ms
memory: 125628kb

input:

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

output:

100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok 

Test #34:

score: 0
Accepted
time: 113ms
memory: 125780kb

input:

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

output:

100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok 

Test #35:

score: 0
Accepted
time: 95ms
memory: 126120kb

input:

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

output:

100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok 

Test #36:

score: 0
Accepted
time: 160ms
memory: 145424kb

input:

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

output:

100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok 

Test #37:

score: 0
Accepted
time: 163ms
memory: 146380kb

input:

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

output:

100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok 

Subtask #4:

score: 6
Accepted

Test #38:

score: 6
Accepted
time: 656ms
memory: 185268kb

input:

1000000
1 18543
4 40327
7 19084
8 44274
10 42366
12 22173
13 9862
15 44706
19 48070
21 13389
24 39273
26 18680
27 46858
28 46126
32 27753
34 28289
36 12220
38 39235
42 28505
45 47348
46 34220
48 47551
50 49156
54 8856
55 25515
56 21932
58 24482
59 20686
61 41381
66 30112
67 44504
70 24510
71 26418
7...

output:

111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok 

Test #39:

score: 0
Accepted
time: 643ms
memory: 185336kb

input:

1000000
2 21155
4 41232
6 20287
7 46837
9 38631
11 6901
15 43358
16 10142
19 28642
20 33035
21 27599
24 20951
27 12983
30 11366
31 20539
32 10621
34 30734
37 6043
41 5841
43 8213
46 8479
47 12328
49 5893
50 22485
51 39760
52 8737
54 43535
56 24827
57 15847
59 8402
61 23013
65 17937
66 18072
69 36863...

output:

111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110111111111111111111111111111111111111111111111111111111111111111111110...

result:

ok 

Test #40:

score: 0
Accepted
time: 646ms
memory: 184380kb

input:

1000000
1 44308
3 27877
4 48227
6 27660
8 26210
9 43909
10 11659
11 34110
13 39632
15 7390
17 40561
20 7928
24 24624
25 9113
27 28937
29 23508
30 41645
32 38110
34 10958
36 37937
37 46339
38 41683
40 7125
41 11569
42 9531
44 29591
45 45867
46 48643
49 7654
50 33740
52 26995
55 13345
57 22001
59 1247...

output:

111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok 

Test #41:

score: 0
Accepted
time: 652ms
memory: 185280kb

input:

1000000
2 31149
4 25209
7 47632
9 13365
10 23457
12 38193
14 6534
15 33175
16 12181
19 26329
21 7294
24 25786
26 39155
27 12081
29 31350
33 16989
36 34867
38 31751
39 38661
41 17345
44 24470
47 41098
48 41797
51 27139
53 40756
54 15934
59 28395
63 46853
64 46994
66 14330
67 46212
69 23352
70 8115
72...

output:

111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok 

Test #42:

score: 0
Accepted
time: 629ms
memory: 185920kb

input:

1000000
1 38450
2 25296
5 6604
7 5068
8 44733
10 49030
11 48217
12 11533
14 7208
15 37097
16 13793
21 41955
23 45683
25 31223
27 27252
28 26319
30 9053
35 41698
36 18276
41 20100
42 32537
44 41677
46 37754
48 28572
50 44106
52 43957
56 21750
57 21732
61 12737
64 45597
66 42872
67 9711
68 25897
69 41...

output:

111111111111111111111111111111111101111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111101111111111111111111111111111111...

result:

ok 

Test #43:

score: 0
Accepted
time: 384ms
memory: 191732kb

input:

1000000
2 880200
3 405629
4 505753
8 827569
9 249542
15 230517
19 801043
21 393006
23 167265
25 246534
28 302737
32 665950
33 146821
35 765079
36 349562
37 691530
39 446351
40 692089
42 997833
43 688018
44 185484
46 236680
48 414992
50 677116
52 922426
55 930670
57 429844
58 978728
60 671339
62 2508...

output:

111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok 

Test #44:

score: 0
Accepted
time: 363ms
memory: 191772kb

input:

1000000
1 905626
2 338678
5 553579
7 552200
8 784328
10 112106
11 928788
12 719285
14 737963
16 204427
17 313941
19 504387
21 61669
22 430904
24 75978
25 248640
26 317625
29 619690
31 193568
32 966216
34 851031
36 964644
37 111735
38 50038
39 436056
41 165749
42 733480
44 45671
46 501053
47 394829
5...

output:

111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok 

Test #45:

score: 0
Accepted
time: 344ms
memory: 191684kb

input:

1000000
1 524431
7 627962
11 814078
12 347856
14 929279
16 407341
19 77713
22 938040
25 611644
26 421438
27 39608
29 875594
31 950490
33 938280
35 569458
36 399569
37 565433
39 200899
41 512932
42 892335
45 785082
49 138075
52 556802
55 964794
56 23280
59 765396
63 56095
65 334489
67 116493
68 64798...

output:

111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok 

Test #46:

score: 0
Accepted
time: 373ms
memory: 191788kb

input:

1000000
2 793441
5 57521
6 977344
8 152182
9 474068
10 56149
12 388264
15 295964
16 404775
18 333353
19 544761
21 208229
22 409823
26 71607
27 49633
30 748788
32 202839
35 362645
37 896518
38 500521
40 561975
41 682139
42 328620
44 733819
45 687203
47 184074
50 496029
52 831999
53 302832
54 228451
5...

output:

111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok 

Test #47:

score: 0
Accepted
time: 370ms
memory: 191664kb

input:

1000000
1 895838
2 325421
3 954723
4 164307
6 340013
7 825549
10 3829
14 523251
15 52480
17 752743
19 256730
21 743287
24 342268
25 348119
27 164916
28 961505
31 446402
33 903443
37 867901
39 765398
40 319469
41 495869
43 425064
45 442601
48 826731
51 870551
53 419326
54 456719
57 200828
59 642520
6...

output:

111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok 

Subtask #5:

score: 0
Wrong Answer

Dependency #2:

100%
Accepted

Test #48:

score: 31
Accepted
time: 11ms
memory: 96192kb

input:

5000
630 834940
1078 467873
1422 66913
1625 637429
1858 7094
2604 14606
2856 736849
3081 499898
3119 554225
3576 425440
4849 908007
4853 104538
5110 977236
5143 964159
5747 640988
6165 361056
6365 647136
6927 363570
7593 417679
7633 166611
7868 239524
7922 119686
8093 769337
8323 289956
8562 213370
...

output:

111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok 

Test #49:

score: 0
Accepted
time: 18ms
memory: 96224kb

input:

5000
206 486676
260 940061
332 373083
417 29815
1123 924826
1271 128160
1361 962093
1678 199894
2006 703883
2178 328224
2298 567105
2299 392376
2391 567115
2506 878188
2959 121221
3121 792812
3293 658936
3303 416738
3526 319765
3532 385020
3588 867772
3744 5609
3766 726252
3986 312153
4412 248563
44...

output:

111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok 

Test #50:

score: -31
Wrong Answer
time: 11ms
memory: 97388kb

input:

5000
56836 502298
22747 398101
22747 668280
22747 91147
156689 608116
156689 178657
156689 874003
199075 534371
199075 485132
670696 485192
670696 512351
670696 675493
670696 991173
479397 663643
479397 295839
479397 249249
479397 954296
138744 878381
138744 437755
138744 614568
138744 848568
138744...

output:

001110111100001010101000000101100010010110010100001101011101001101010001001100100101010001010000010000101001000011001101100100101000101000101100010000001011101000100010000100000001100011000101101011001000000100101100010010000100001000100100100110010010111100010110010110001000111000100000100101001000...

result:

wrong answer 

Subtask #6:

score: 0
Skipped

Dependency #5:

0%

Subtask #7:

score: 0
Wrong Answer

Test #85:

score: 0
Wrong Answer
time: 330ms
memory: 184668kb

input:

1000000
1 602300
1 778881
2 397065
3 291452
3 678039
5 235300
6 499367
8 8597
10 327718
10 516489
12 416542
12 440048
13 284169
13 383581
13 642202
13 770858
14 378154
14 710033
15 905531
16 50155
17 142259
19 395613
19 500321
20 358934
21 461772
24 562953
24 995887
25 421244
27 900412
29 301006
31 ...

output:

111111111111100111111111111111101111110111101101111111111111111111111111111111111101111110111111111111110011111011111111111111111111111001111011111001100111101111111111000111111111111111000111111111101111111011111111111111110111111111111111111101111111110111111111011111111111111111111111110110011111...

result:

wrong answer