QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#183326#5375. SearchLynkcat30 375ms50468kbC++203.5kb2023-09-19 13:41:012023-09-19 13:41:02

Judging History

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

  • [2023-09-19 13:41:02]
  • 评测
  • 测评结果:30
  • 用时:375ms
  • 内存:50468kb
  • [2023-09-19 13:41:01]
  • 提交

answer

#include <bits/stdc++.h>
#include "search.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

using namespace std;

namespace query 
{
    const int N=2005;
    int n;
    int bnd[N],pos[N];
    int mx,my;
    mt19937_64 rnd(time(0));
    void geta(int k,int x,int y)
    {
        if (!x) return;
        int l=pos[k]+1,r=bnd[k];
        while (l<=r)
        {
            int mid=l+(r-l)/2;
            if (ask1(mid,k,x,y)=="<")
            {
                pos[k]=mid;
                l=mid+1;
            } else r=mid-1;
        }
    }
    void getr(int k)
    {
        int l=pos[k]+1,r=bnd[k];
        // cout<<"!"<<k<<" "<<l<<" "<<r<<" "<<mx<<" "<<my<<'\n';
        while (l<=r)
        {
            int mid=l+(r-l)/2;
            // if (r-l+1<=20)
            //     mid=r;
            if (ask2(mid,k)=="<")
            {
                pos[k]=mid;
                l=mid+1;
            } else 
            {
                // bnd[k]=mid-1;
                r=mid-1;
            }
        }
        // cout<<","<<pos[k]<<endl;
    }
    void getlf(int k,int x)
    {
        int l=1,r=k-1;
        int res=k;
        while (l<=r&&pos[l]>=x) l++;
        while (l<=r)
        {
            int mid=l+(r-l)/2;
            if (ask2(x,mid)=="<")
            {
                l=mid+1;
            } else 
            {
                res=mid;
                r=mid-1;
            }
        }
        for (int i=res;i<=k;i++)
            pos[i]=x-1,bnd[i]=x-1;
        int cx=x,cy=res;
        if (cx<=n&&(cx!=mx||cy!=my)&&ask1(cx,cy,mx,my)=="<") mx=cx,my=cy;
    }
    void upd(int k,int x,int y)
    {
        int l=pos[k]+1,r=bnd[k];
        while (l<=r)
        {
            int mid=l+(r-l)/2;
            if (ask1(mid,k,x,y)=="<")
            {
                l=mid+1;
            } else
            {
                bnd[k]=mid-1;
                r=mid-1;
            }
        }
    }
    int solve()
    {
        bool bl=1;
        for (int i=1;i<=n;i++)
            if (pos[i]==bnd[i]) bl&=1;
            else bl=0;
        int tot=0;
        for (int i=1;i<=n;i++)
        {
            tot+=bnd[i]-pos[i];
        }
        // cout<<tot<<endl;
        if (bl) return 1;
        int sm=0;
        poly g;
        for (int i=1;i<=n;i++) 
        {
            sm+=bnd[i]-pos[i];
            if (bnd[i]!=pos[i]) g.push_back(i);
        }
        int od=rnd()%sm;
        sm=0;
        int cx=0,cy=0;
        for (auto u:g)
        {
            sm+=bnd[u]-pos[u];
            if (od<sm)
            {
                cx=bnd[u]-(sm-od)+1;
                cy=u;
                break;
            }
        }
        if (ask2(cx,cy)=="<")
        {
            pos[cy]=cx;
            for (int i=1;i<=n;i++)
                geta(i,cx,cy);
        } else
        {
            bnd[cy]=cx-1;
            for (int i=1;i<=n;i++) upd(i,cx,cy);
        }
        return 0;
    }

    int main(int nn) 
    {
        n=nn;
        mx=n,my=n;
        if (ask2(n,n)=="<")
        {
            return n*n;
        }
        poly g;
        for (int i=1;i<=n;i++)
            g.push_back(i),bnd[i]=n;
        while (!solve());
        int ans=0;
        for (int i=1;i<=n;i++) ans+=pos[i];
        return ans;
    }
}

詳細信息

Subtask #1:

score: 10
Accepted

Test #1:

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

input:

6 3
384 45
837639677

output:

1 74 10

result:

points 1.0 correct, ask1 called 74 time(s), ask2 called 10 time(s)

Test #2:

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

input:

8 59
512 45
439876779

output:

1 116 12

result:

points 1.0 correct, ask1 called 116 time(s), ask2 called 12 time(s)

Test #3:

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

input:

9 27
576 45
777817090

output:

1 144 11

result:

points 1.0 correct, ask1 called 144 time(s), ask2 called 11 time(s)

Test #4:

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

input:

7 14
448 45
42081112

output:

1 51 7

result:

points 1.0 correct, ask1 called 51 time(s), ask2 called 7 time(s)

Test #5:

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

input:

6 14
384 45
380054191

output:

1 50 6

result:

points 1.0 correct, ask1 called 50 time(s), ask2 called 6 time(s)

Test #6:

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

input:

9 13
576 45
718060038

output:

1 93 10

result:

points 1.0 correct, ask1 called 93 time(s), ask2 called 10 time(s)

Test #7:

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

input:

9 16
576 45
1056065885

output:

1 109 9

result:

points 1.0 correct, ask1 called 109 time(s), ask2 called 9 time(s)

Test #8:

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

input:

7 41
448 45
320297139

output:

1 79 11

result:

points 1.0 correct, ask1 called 79 time(s), ask2 called 11 time(s)

Test #9:

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

input:

7 33
448 45
658302986

output:

1 81 9

result:

points 1.0 correct, ask1 called 81 time(s), ask2 called 9 time(s)

Test #10:

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

input:

7 30
448 45
996276065

output:

1 55 7

result:

points 1.0 correct, ask1 called 55 time(s), ask2 called 7 time(s)

Test #11:

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

input:

7 37
448 45
598480398

output:

1 22 5

result:

points 1.0 correct, ask1 called 22 time(s), ask2 called 5 time(s)

Test #12:

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

input:

10 27
640 45
936486245

output:

1 127 10

result:

points 1.0 correct, ask1 called 127 time(s), ask2 called 10 time(s)

Test #13:

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

input:

8 22
512 45
200750268

output:

1 58 7

result:

points 1.0 correct, ask1 called 58 time(s), ask2 called 7 time(s)

Test #14:

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

input:

10 41
640 45
538723346

output:

1 153 14

result:

points 1.0 correct, ask1 called 153 time(s), ask2 called 14 time(s)

Test #15:

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

input:

6 35
384 45
876729193

output:

1 61 10

result:

points 1.0 correct, ask1 called 61 time(s), ask2 called 10 time(s)

Test #16:

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

input:

10 98
640 45
140960448

output:

1 115 11

result:

points 1.0 correct, ask1 called 115 time(s), ask2 called 11 time(s)

Test #17:

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

input:

8 36
512 45
478966295

output:

1 66 8

result:

points 1.0 correct, ask1 called 66 time(s), ask2 called 8 time(s)

Test #18:

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

input:

8 9
512 45
81170628

output:

1 86 11

result:

points 1.0 correct, ask1 called 86 time(s), ask2 called 11 time(s)

Test #19:

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

input:

6 20
384 45
419176475

output:

1 68 9

result:

points 1.0 correct, ask1 called 68 time(s), ask2 called 9 time(s)

Test #20:

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

input:

6 23
384 45
757149553

output:

1 89 8

result:

points 1.0 correct, ask1 called 89 time(s), ask2 called 8 time(s)

Subtask #2:

score: 20
Acceptable Answer

Test #21:

score: 40
Acceptable Answer
time: 361ms
memory: 50204kb

input:

1998 997469
511488 45
691176210

output:

1 91516 38

result:

points 0.44444444440 correct, ask1 called 91516 time(s), ask2 called 38 time(s)

Test #22:

score: 65
Acceptable Answer
time: 363ms
memory: 50316kb

input:

1997 250682
511232 45
1029182057

output:

1 56292 35

result:

points 0.72222222220 correct, ask1 called 56292 time(s), ask2 called 35 time(s)

Test #23:

score: 90
Accepted
time: 370ms
memory: 50204kb

input:

2000 1742216
512000 45
293413312

output:

1 63034 31

result:

points 1.0 correct, ask1 called 63034 time(s), ask2 called 31 time(s)

Test #24:

score: 65
Acceptable Answer
time: 366ms
memory: 50192kb

input:

1996 2394420
510976 45
631419158

output:

1 90397 35

result:

points 0.72222222220 correct, ask1 called 90397 time(s), ask2 called 35 time(s)

Test #25:

score: 40
Acceptable Answer
time: 363ms
memory: 50088kb

input:

1998 3398507
511488 45
969425005

output:

1 63931 37

result:

points 0.44444444440 correct, ask1 called 63931 time(s), ask2 called 37 time(s)

Test #26:

score: 90
Accepted
time: 360ms
memory: 50264kb

input:

1998 574252
511488 45
571662106

output:

1 50844 28

result:

points 1.0 correct, ask1 called 50844 time(s), ask2 called 28 time(s)

Test #27:

score: 90
Accepted
time: 359ms
memory: 50216kb

input:

1996 1162097
510976 45
909635185

output:

1 41045 23

result:

points 1.0 correct, ask1 called 41045 time(s), ask2 called 23 time(s)

Test #28:

score: 90
Accepted
time: 365ms
memory: 50100kb

input:

1999 1287929
511744 45
173899208

output:

1 50249 32

result:

points 1.0 correct, ask1 called 50249 time(s), ask2 called 32 time(s)

Test #29:

score: 90
Accepted
time: 363ms
memory: 49848kb

input:

1996 513076
510976 45
511839519

output:

1 63788 30

result:

points 1.0 correct, ask1 called 63788 time(s), ask2 called 30 time(s)

Test #30:

score: 90
Accepted
time: 363ms
memory: 50256kb

input:

1999 2359752
511744 45
849845365

output:

1 86342 31

result:

points 1.0 correct, ask1 called 86342 time(s), ask2 called 31 time(s)

Test #31:

score: 90
Accepted
time: 362ms
memory: 50312kb

input:

1996 1905307
510976 45
114109388

output:

1 61562 30

result:

points 1.0 correct, ask1 called 61562 time(s), ask2 called 30 time(s)

Test #32:

score: 90
Accepted
time: 364ms
memory: 50164kb

input:

1999 3464342
511744 45
452082467

output:

1 88150 30

result:

points 1.0 correct, ask1 called 88150 time(s), ask2 called 30 time(s)

Test #33:

score: 40
Acceptable Answer
time: 366ms
memory: 50320kb

input:

1997 3041161
511232 45
790088314

output:

1 71503 37

result:

points 0.44444444440 correct, ask1 called 71503 time(s), ask2 called 37 time(s)

Test #34:

score: 90
Accepted
time: 366ms
memory: 50056kb

input:

1999 605699
511744 45
54319568

output:

1 84747 26

result:

points 1.0 correct, ask1 called 84747 time(s), ask2 called 26 time(s)

Test #35:

score: 20
Acceptable Answer
time: 365ms
memory: 50196kb

input:

2000 3411048
512000 45
392325415

output:

1 94518 42

result:

points 0.22222222220 correct, ask1 called 94518 time(s), ask2 called 42 time(s)

Test #36:

score: 20
Acceptable Answer
time: 360ms
memory: 50332kb

input:

1999 1677521
511744 45
730331262

output:

1 87159 40

result:

points 0.22222222220 correct, ask1 called 87159 time(s), ask2 called 40 time(s)

Test #37:

score: 90
Accepted
time: 359ms
memory: 50140kb

input:

1997 1645949
511232 45
1068271572

output:

1 73861 33

result:

points 1.0 correct, ask1 called 73861 time(s), ask2 called 33 time(s)

Test #38:

score: 65
Acceptable Answer
time: 365ms
memory: 50060kb

input:

2000 1395508
512000 45
670508674

output:

1 52377 36

result:

points 0.72222222220 correct, ask1 called 52377 time(s), ask2 called 36 time(s)

Test #39:

score: 90
Accepted
time: 364ms
memory: 50468kb

input:

2000 1045422
512000 45
1008514521

output:

1 69185 28

result:

points 1.0 correct, ask1 called 69185 time(s), ask2 called 28 time(s)

Test #40:

score: 40
Acceptable Answer
time: 357ms
memory: 50172kb

input:

2000 2404123
512000 45
272745775

output:

1 116775 37

result:

points 0.44444444440 correct, ask1 called 116775 time(s), ask2 called 37 time(s)

Test #41:

score: 90
Accepted
time: 369ms
memory: 50184kb

input:

1998 2301912
511488 45
610751622

output:

1 94647 33

result:

points 1.0 correct, ask1 called 94647 time(s), ask2 called 33 time(s)

Test #42:

score: 90
Accepted
time: 365ms
memory: 50156kb

input:

2000 3412738
512000 45
948757469

output:

1 87405 32

result:

points 1.0 correct, ask1 called 87405 time(s), ask2 called 32 time(s)

Test #43:

score: 90
Accepted
time: 371ms
memory: 50080kb

input:

1998 3469663
511488 45
212988724

output:

1 71890 24

result:

points 1.0 correct, ask1 called 71890 time(s), ask2 called 24 time(s)

Test #44:

score: 90
Accepted
time: 356ms
memory: 50336kb

input:

1996 3617351
510976 45
550961802

output:

1 119731 25

result:

points 1.0 correct, ask1 called 119731 time(s), ask2 called 25 time(s)

Test #45:

score: 40
Acceptable Answer
time: 372ms
memory: 50192kb

input:

1998 710945
511488 45
888934881

output:

1 84364 37

result:

points 0.44444444440 correct, ask1 called 84364 time(s), ask2 called 37 time(s)

Test #46:

score: 40
Acceptable Answer
time: 361ms
memory: 50124kb

input:

1999 2333740
511744 45
153198904

output:

1 51508 38

result:

points 0.44444444440 correct, ask1 called 51508 time(s), ask2 called 38 time(s)

Test #47:

score: 65
Acceptable Answer
time: 357ms
memory: 50332kb

input:

1998 1878695
511488 45
491171982

output:

1 93634 36

result:

points 0.72222222220 correct, ask1 called 93634 time(s), ask2 called 36 time(s)

Test #48:

score: 90
Accepted
time: 362ms
memory: 50108kb

input:

1997 3590574
511232 45
93441852

output:

1 56942 24

result:

points 1.0 correct, ask1 called 56942 time(s), ask2 called 24 time(s)

Test #49:

score: 40
Acceptable Answer
time: 361ms
memory: 50168kb

input:

1996 1801543
510976 45
431414931

output:

1 79688 37

result:

points 0.44444444440 correct, ask1 called 79688 time(s), ask2 called 37 time(s)

Test #50:

score: 20
Acceptable Answer
time: 364ms
memory: 50108kb

input:

1999 3672188
511744 45
769420777

output:

1 90052 39

result:

points 0.22222222220 correct, ask1 called 90052 time(s), ask2 called 39 time(s)

Test #51:

score: 90
Accepted
time: 370ms
memory: 50332kb

input:

1997 1535960
383424 38
726700757

output:

1 87656 28

result:

points 1.0 correct, ask1 called 87656 time(s), ask2 called 28 time(s)

Test #52:

score: 20
Acceptable Answer
time: 357ms
memory: 50184kb

input:

1999 3382611
383808 38
1064673836

output:

1 69459 39

result:

points 0.22222222220 correct, ask1 called 69459 time(s), ask2 called 39 time(s)

Test #53:

score: 90
Accepted
time: 367ms
memory: 50240kb

input:

1999 2544646
383808 38
328937859

output:

1 67434 32

result:

points 1.0 correct, ask1 called 67434 time(s), ask2 called 32 time(s)

Test #54:

score: 90
Accepted
time: 365ms
memory: 50060kb

input:

2000 3759384
384000 38
666910937

output:

1 64523 32

result:

points 1.0 correct, ask1 called 64523 time(s), ask2 called 32 time(s)

Test #55:

score: 90
Accepted
time: 366ms
memory: 50224kb

input:

2000 767997
384000 38
269148039

output:

1 119464 33

result:

points 1.0 correct, ask1 called 119464 time(s), ask2 called 33 time(s)

Test #56:

score: 90
Accepted
time: 362ms
memory: 50220kb

input:

1997 1437146
383424 38
607153886

output:

1 61997 24

result:

points 1.0 correct, ask1 called 61997 time(s), ask2 called 24 time(s)

Test #57:

score: 90
Accepted
time: 367ms
memory: 50384kb

input:

2000 1776612
384000 38
945159732

output:

1 54982 28

result:

points 1.0 correct, ask1 called 54982 time(s), ask2 called 28 time(s)

Test #58:

score: 20
Acceptable Answer
time: 366ms
memory: 50212kb

input:

1998 2265321
383616 38
209358219

output:

1 72692 39

result:

points 0.22222222220 correct, ask1 called 72692 time(s), ask2 called 39 time(s)

Test #59:

score: 90
Accepted
time: 361ms
memory: 50100kb

input:

1997 1854922
383424 38
547364066

output:

1 50937 29

result:

points 1.0 correct, ask1 called 50937 time(s), ask2 called 29 time(s)

Test #60:

score: 90
Accepted
time: 358ms
memory: 50120kb

input:

1998 3465840
383616 38
885337145

output:

1 51892 28

result:

points 1.0 correct, ask1 called 51892 time(s), ask2 called 28 time(s)

Test #61:

score: 90
Accepted
time: 371ms
memory: 50460kb

input:

2000 2052285
384000 38
149601167

output:

1 56439 25

result:

points 1.0 correct, ask1 called 56439 time(s), ask2 called 25 time(s)

Test #62:

score: 90
Accepted
time: 362ms
memory: 50200kb

input:

1998 674354
383616 38
487574246

output:

1 51269 26

result:

points 1.0 correct, ask1 called 51269 time(s), ask2 called 26 time(s)

Test #63:

score: 90
Accepted
time: 358ms
memory: 50136kb

input:

1996 3620340
383232 38
825580093

output:

1 84860 19

result:

points 1.0 correct, ask1 called 84860 time(s), ask2 called 19 time(s)

Test #64:

score: 90
Accepted
time: 371ms
memory: 50124kb

input:

1998 1874872
383616 38
89844115

output:

1 52806 30

result:

points 1.0 correct, ask1 called 52806 time(s), ask2 called 30 time(s)

Test #65:

score: 90
Accepted
time: 360ms
memory: 50320kb

input:

1996 995786
383232 38
427817194

output:

1 93806 28

result:

points 1.0 correct, ask1 called 93806 time(s), ask2 called 28 time(s)

Test #66:

score: 65
Acceptable Answer
time: 363ms
memory: 50160kb

input:

1996 2420784
383232 38
30021528

output:

1 88126 35

result:

points 0.72222222220 correct, ask1 called 88126 time(s), ask2 called 35 time(s)

Test #67:

score: 90
Accepted
time: 360ms
memory: 50364kb

input:

1999 3356599
383808 38
368027374

output:

1 91000 30

result:

points 1.0 correct, ask1 called 91000 time(s), ask2 called 30 time(s)

Test #68:

score: 40
Acceptable Answer
time: 357ms
memory: 50120kb

input:

1999 2485867
383808 38
706033221

output:

1 41793 38

result:

points 0.44444444440 correct, ask1 called 41793 time(s), ask2 called 38 time(s)

Test #69:

score: 20
Acceptable Answer
time: 361ms
memory: 50004kb

input:

1997 2470380
383424 38
1044006300

output:

1 103221 39

result:

points 0.22222222220 correct, ask1 called 103221 time(s), ask2 called 39 time(s)

Test #70:

score: 90
Accepted
time: 361ms
memory: 50208kb

input:

1996 1188460
383232 38
308270323

output:

1 99284 33

result:

points 1.0 correct, ask1 called 99284 time(s), ask2 called 33 time(s)

Test #71:

score: 90
Accepted
time: 362ms
memory: 50204kb

input:

1997 2799645
383424 38
646243401

output:

1 86882 34

result:

points 1.0 correct, ask1 called 86882 time(s), ask2 called 34 time(s)

Test #72:

score: 90
Accepted
time: 355ms
memory: 50040kb

input:

1999 699046
383808 38
984249248

output:

1 59304 27

result:

points 1.0 correct, ask1 called 59304 time(s), ask2 called 27 time(s)

Test #73:

score: 90
Accepted
time: 354ms
memory: 50172kb

input:

1999 3857083
383808 38
248447735

output:

1 70156 32

result:

points 1.0 correct, ask1 called 70156 time(s), ask2 called 32 time(s)

Test #74:

score: 90
Accepted
time: 363ms
memory: 50176kb

input:

2000 1079818
384000 38
586453581

output:

1 70799 26

result:

points 1.0 correct, ask1 called 70799 time(s), ask2 called 26 time(s)

Test #75:

score: 90
Accepted
time: 357ms
memory: 50356kb

input:

1997 1404432
383424 38
924459428

output:

1 73602 25

result:

points 1.0 correct, ask1 called 73602 time(s), ask2 called 25 time(s)

Test #76:

score: 90
Accepted
time: 364ms
memory: 50232kb

input:

1997 2700831
383424 38
526696530

output:

1 47702 28

result:

points 1.0 correct, ask1 called 47702 time(s), ask2 called 28 time(s)

Test #77:

score: 90
Accepted
time: 368ms
memory: 50124kb

input:

2000 3097047
384000 38
864669608

output:

1 49812 32

result:

points 1.0 correct, ask1 called 49812 time(s), ask2 called 32 time(s)

Test #78:

score: 40
Acceptable Answer
time: 363ms
memory: 50204kb

input:

1998 3569764
383616 38
128933631

output:

1 112178 37

result:

points 0.44444444440 correct, ask1 called 112178 time(s), ask2 called 37 time(s)

Test #79:

score: 90
Accepted
time: 358ms
memory: 50180kb

input:

1998 2103877
383616 38
466906710

output:

1 56238 34

result:

points 1.0 correct, ask1 called 56238 time(s), ask2 called 34 time(s)

Test #80:

score: 65
Acceptable Answer
time: 372ms
memory: 50188kb

input:

1998 778278
383616 38
804912557

output:

1 85292 35

result:

points 0.72222222220 correct, ask1 called 85292 time(s), ask2 called 35 time(s)

Test #81:

score: 20
Acceptable Answer
time: 367ms
memory: 50268kb

input:

2000 2961353
256000 36
853017067

output:

1 146592 43

result:

points 0.22222222220 correct, ask1 called 146592 time(s), ask2 called 43 time(s)

Test #82:

score: 90
Accepted
time: 362ms
memory: 50144kb

input:

1996 2578498
255488 36
117281089

output:

1 108807 26

result:

points 1.0 correct, ask1 called 108807 time(s), ask2 called 26 time(s)

Test #83:

score: 90
Accepted
time: 358ms
memory: 50208kb

input:

1996 3937961
255488 36
793260015

output:

1 50293 31

result:

points 1.0 correct, ask1 called 50293 time(s), ask2 called 31 time(s)

Test #84:

score: 90
Accepted
time: 358ms
memory: 50112kb

input:

1998 2345897
255744 36
57491270

output:

1 51834 30

result:

points 1.0 correct, ask1 called 51834 time(s), ask2 called 30 time(s)

Test #85:

score: 20
Acceptable Answer
time: 360ms
memory: 50332kb

input:

1996 1378943
255488 36
395497116

output:

1 82616 39

result:

points 0.22222222220 correct, ask1 called 82616 time(s), ask2 called 39 time(s)

Test #86:

score: 90
Accepted
time: 362ms
memory: 50128kb

input:

1999 2734233
255872 36
733502963

output:

1 40396 23

result:

points 1.0 correct, ask1 called 40396 time(s), ask2 called 23 time(s)

Test #87:

score: 90
Accepted
time: 368ms
memory: 50128kb

input:

1999 1863500
255872 36
1071476042

output:

1 52267 28

result:

points 1.0 correct, ask1 called 52267 time(s), ask2 called 28 time(s)

Test #88:

score: 90
Accepted
time: 368ms
memory: 50216kb

input:

1999 3838824
255872 36
335740064

output:

1 59060 25

result:

points 1.0 correct, ask1 called 59060 time(s), ask2 called 25 time(s)

Test #89:

score: 90
Accepted
time: 354ms
memory: 50004kb

input:

1996 146619
255488 36
673680375

output:

1 69657 26

result:

points 1.0 correct, ask1 called 69657 time(s), ask2 called 26 time(s)

Test #90:

score: 90
Accepted
time: 367ms
memory: 50008kb

input:

1997 2897460
255616 36
1011686222

output:

1 77680 30

result:

points 1.0 correct, ask1 called 77680 time(s), ask2 called 30 time(s)

Test #91:

score: 90
Accepted
time: 361ms
memory: 50092kb

input:

2000 3588803
256000 36
275917477

output:

1 75604 29

result:

points 1.0 correct, ask1 called 75604 time(s), ask2 called 29 time(s)

Test #92:

score: 90
Accepted
time: 356ms
memory: 50264kb

input:

1999 2052003
255872 36
613923323

output:

1 69561 31

result:

points 1.0 correct, ask1 called 69561 time(s), ask2 called 31 time(s)

Test #93:

score: 90
Accepted
time: 364ms
memory: 50188kb

input:

2000 597416
256000 36
951929170

output:

1 63903 25

result:

points 1.0 correct, ask1 called 63903 time(s), ask2 called 25 time(s)

Test #94:

score: 90
Accepted
time: 357ms
memory: 50044kb

input:

1997 502346
255616 36
216160425

output:

1 45723 33

result:

points 1.0 correct, ask1 called 45723 time(s), ask2 called 33 time(s)

Test #95:

score: 90
Accepted
time: 363ms
memory: 50128kb

input:

1998 1639752
255744 36
892139350

output:

1 51976 26

result:

points 1.0 correct, ask1 called 51976 time(s), ask2 called 26 time(s)

Test #96:

score: 90
Accepted
time: 353ms
memory: 50128kb

input:

2000 2614645
256000 36
156370605

output:

1 72389 34

result:

points 1.0 correct, ask1 called 72389 time(s), ask2 called 34 time(s)

Test #97:

score: 90
Accepted
time: 358ms
memory: 50128kb

input:

1998 2807503
255744 36
494343684

output:

1 88184 33

result:

points 1.0 correct, ask1 called 88184 time(s), ask2 called 33 time(s)

Test #98:

score: 90
Accepted
time: 364ms
memory: 50256kb

input:

2000 3623260
256000 36
832349530

output:

1 89614 34

result:

points 1.0 correct, ask1 called 89614 time(s), ask2 called 34 time(s)

Test #99:

score: 90
Accepted
time: 362ms
memory: 50220kb

input:

1998 16016
255744 36
96613553

output:

1 49115 29

result:

points 1.0 correct, ask1 called 49115 time(s), ask2 called 29 time(s)

Test #100:

score: 90
Accepted
time: 363ms
memory: 50024kb

input:

1996 499201
255488 36
434586632

output:

1 34629 25

result:

points 1.0 correct, ask1 called 34629 time(s), ask2 called 25 time(s)

Test #101:

score: 20
Acceptable Answer
time: 362ms
memory: 50340kb

input:

1996 2183083
255488 36
772592479

output:

1 68553 40

result:

points 0.22222222220 correct, ask1 called 68553 time(s), ask2 called 40 time(s)

Test #102:

score: 90
Accepted
time: 360ms
memory: 50208kb

input:

1996 1924199
255488 36
36823733

output:

1 63881 18

result:

points 1.0 correct, ask1 called 63881 time(s), ask2 called 18 time(s)

Test #103:

score: 90
Accepted
time: 367ms
memory: 50208kb

input:

1998 2417054
255744 36
374829580

output:

1 82768 34

result:

points 1.0 correct, ask1 called 82768 time(s), ask2 called 34 time(s)

Test #104:

score: 90
Accepted
time: 365ms
memory: 50156kb

input:

1999 966756
255872 36
712769891

output:

1 84973 34

result:

points 1.0 correct, ask1 called 84973 time(s), ask2 called 34 time(s)

Test #105:

score: 20
Acceptable Answer
time: 363ms
memory: 50200kb

input:

1997 271949
255616 36
1050775738

output:

1 42631 39

result:

points 0.22222222220 correct, ask1 called 42631 time(s), ask2 called 39 time(s)

Test #106:

score: 65
Acceptable Answer
time: 361ms
memory: 50016kb

input:

1996 2634642
255488 36
315039760

output:

1 66523 35

result:

points 0.72222222220 correct, ask1 called 66523 time(s), ask2 called 35 time(s)

Test #107:

score: 40
Acceptable Answer
time: 360ms
memory: 50148kb

input:

1997 1601116
255616 36
653012839

output:

1 125215 37

result:

points 0.44444444440 correct, ask1 called 125215 time(s), ask2 called 37 time(s)

Test #108:

score: 90
Accepted
time: 360ms
memory: 50112kb

input:

1999 1155259
255872 36
255249940

output:

1 85668 34

result:

points 1.0 correct, ask1 called 85668 time(s), ask2 called 34 time(s)

Test #109:

score: 40
Acceptable Answer
time: 363ms
memory: 50340kb

input:

1999 284526
255872 36
593255787

output:

1 96075 37

result:

points 0.44444444440 correct, ask1 called 96075 time(s), ask2 called 37 time(s)

Test #110:

score: 90
Accepted
time: 357ms
memory: 50332kb

input:

1997 173135
255616 36
931228866

output:

1 30049 22

result:

points 1.0 correct, ask1 called 30049 time(s), ask2 called 22 time(s)

Test #111:

score: 90
Accepted
time: 364ms
memory: 49860kb

input:

1996 2189413
127744 34
618447205

output:

1 93250 32

result:

points 1.0 correct, ask1 called 93250 time(s), ask2 called 32 time(s)

Test #112:

score: 90
Accepted
time: 354ms
memory: 50140kb

input:

1999 3781216
127936 34
956453051

output:

1 87619 34

result:

points 1.0 correct, ask1 called 87619 time(s), ask2 called 34 time(s)

Test #113:

score: 65
Acceptable Answer
time: 363ms
memory: 50336kb

input:

1996 3614412
127744 34
220684306

output:

1 52522 35

result:

points 0.72222222220 correct, ask1 called 52522 time(s), ask2 called 35 time(s)

Test #114:

score: 65
Acceptable Answer
time: 363ms
memory: 50156kb

input:

1999 889805
127936 34
558690153

output:

1 81106 35

result:

points 0.72222222220 correct, ask1 called 81106 time(s), ask2 called 35 time(s)

Test #115:

score: 90
Accepted
time: 363ms
memory: 50220kb

input:

1996 989857
127744 34
896663231

output:

1 68232 32

result:

points 1.0 correct, ask1 called 68232 time(s), ask2 called 32 time(s)

Test #116:

score: 40
Acceptable Answer
time: 358ms
memory: 50304kb

input:

1997 1962823
127808 34
498867565

output:

1 56688 37

result:

points 0.44444444440 correct, ask1 called 56688 time(s), ask2 called 37 time(s)

Test #117:

score: 90
Accepted
time: 367ms
memory: 50184kb

input:

1999 3098986
127936 34
836873412

output:

1 91869 32

result:

points 1.0 correct, ask1 called 91869 time(s), ask2 called 32 time(s)

Test #118:

score: 20
Acceptable Answer
time: 366ms
memory: 50068kb

input:

2000 1712383
128000 34
101137434

output:

1 135575 41

result:

points 0.22222222220 correct, ask1 called 135575 time(s), ask2 called 41 time(s)

Test #119:

score: 90
Accepted
time: 354ms
memory: 50128kb

input:

1997 1413465
127808 34
439110513

output:

1 103057 33

result:

points 1.0 correct, ask1 called 103057 time(s), ask2 called 33 time(s)

Test #120:

score: 90
Accepted
time: 363ms
memory: 50132kb

input:

1997 567610
127808 34
777116360

output:

1 29064 15

result:

points 1.0 correct, ask1 called 29064 time(s), ask2 called 15 time(s)

Test #121:

score: 20
Acceptable Answer
time: 363ms
memory: 50080kb

input:

1998 2586018
127872 34
41347615

output:

1 89376 39

result:

points 0.22222222220 correct, ask1 called 89376 time(s), ask2 called 39 time(s)

Test #122:

score: 90
Accepted
time: 363ms
memory: 50060kb

input:

2000 3696844
128000 34
379353461

output:

1 74187 30

result:

points 1.0 correct, ask1 called 74187 time(s), ask2 called 30 time(s)

Test #123:

score: 90
Accepted
time: 367ms
memory: 50160kb

input:

2000 3346757
128000 34
717293772

output:

1 86264 30

result:

points 1.0 correct, ask1 called 86264 time(s), ask2 called 30 time(s)

Test #124:

score: 90
Accepted
time: 367ms
memory: 50320kb

input:

2000 738225
128000 34
1055299619

output:

1 63281 28

result:

points 1.0 correct, ask1 called 63281 time(s), ask2 called 28 time(s)

Test #125:

score: 90
Accepted
time: 364ms
memory: 50196kb

input:

1998 995051
127872 34
319563641

output:

1 76382 22

result:

points 1.0 correct, ask1 called 76382 time(s), ask2 called 22 time(s)

Test #126:

score: 90
Accepted
time: 359ms
memory: 49844kb

input:

1996 1342439
127744 34
657536720

output:

1 48352 26

result:

points 1.0 correct, ask1 called 48352 time(s), ask2 called 26 time(s)

Test #127:

score: 90
Accepted
time: 358ms
memory: 50192kb

input:

1998 2195569
127872 34
995542567

output:

1 65321 28

result:

points 1.0 correct, ask1 called 65321 time(s), ask2 called 28 time(s)

Test #128:

score: 65
Acceptable Answer
time: 356ms
memory: 50128kb

input:

1998 3396088
127872 34
597779668

output:

1 59106 35

result:

points 0.72222222220 correct, ask1 called 59106 time(s), ask2 called 35 time(s)

Test #129:

score: 90
Accepted
time: 364ms
memory: 50328kb

input:

1996 2085649
127744 34
935752747

output:

1 55479 32

result:

points 1.0 correct, ask1 called 55479 time(s), ask2 called 32 time(s)

Test #130:

score: 90
Accepted
time: 362ms
memory: 50400kb

input:

1999 3989063
127936 34
199984002

output:

1 65177 33

result:

points 1.0 correct, ask1 called 65177 time(s), ask2 called 33 time(s)

Test #131:

score: 90
Accepted
time: 359ms
memory: 50340kb

input:

1996 3477880
127744 34
537989849

output:

1 48972 29

result:

points 1.0 correct, ask1 called 48972 time(s), ask2 called 29 time(s)

Test #132:

score: 90
Accepted
time: 351ms
memory: 50204kb

input:

1999 1064883
127936 34
875962927

output:

1 56659 33

result:

points 1.0 correct, ask1 called 56659 time(s), ask2 called 33 time(s)

Test #133:

score: 90
Accepted
time: 359ms
memory: 50188kb

input:

1999 194151
127936 34
140226950

output:

1 83941 28

result:

points 1.0 correct, ask1 called 83941 time(s), ask2 called 28 time(s)

Test #134:

score: 90
Accepted
time: 359ms
memory: 50192kb

input:

1999 2202242
127936 34
478200029

output:

1 57383 26

result:

points 1.0 correct, ask1 called 57383 time(s), ask2 called 26 time(s)

Test #135:

score: 90
Accepted
time: 360ms
memory: 50112kb

input:

1997 1962877
127808 34
816205876

output:

1 69552 30

result:

points 1.0 correct, ask1 called 69552 time(s), ask2 called 30 time(s)

Test #136:

score: 90
Accepted
time: 359ms
memory: 50200kb

input:

1997 1084254
127808 34
80437130

output:

1 74694 33

result:

points 1.0 correct, ask1 called 74694 time(s), ask2 called 33 time(s)

Test #137:

score: 90
Accepted
time: 368ms
memory: 50252kb

input:

2000 1991435
128000 34
418442977

output:

1 54039 22

result:

points 1.0 correct, ask1 called 54039 time(s), ask2 called 22 time(s)

Test #138:

score: 90
Accepted
time: 358ms
memory: 50128kb

input:

1999 382653
127936 34
756448824

output:

1 102232 32

result:

points 1.0 correct, ask1 called 102232 time(s), ask2 called 32 time(s)

Test #139:

score: 90
Accepted
time: 375ms
memory: 50260kb

input:

2000 3032817
128000 34
20647310

output:

1 95215 31

result:

points 1.0 correct, ask1 called 95215 time(s), ask2 called 31 time(s)

Test #140:

score: 65
Acceptable Answer
time: 367ms
memory: 50420kb

input:

1997 1864063
127808 34
696626236

output:

1 84842 36

result:

points 0.72222222220 correct, ask1 called 84842 time(s), ask2 called 36 time(s)