QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#496931#4575. Interactive Treasure HuntcyanacWA 1ms3636kbC++141.2kb2024-07-28 17:01:512024-07-28 17:01:53

Judging History

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

  • [2024-07-28 17:01:53]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3636kb
  • [2024-07-28 17:01:51]
  • 提交

answer

    #include <bits/stdc++.h>
    using namespace std;
    #define int long long
    void query(int x,int y)
    {
        cout<<"SCAN"<<' '<<x<<' '<<y<<endl;
    }
    void dig(int x,int y)
    {
        cout<<"DIG"<<' '<<x<<' '<<y<<endl;
    }
    void solve()
    {
        int n,m;
        cin>>n>>m;
        query(1,1);
        int t1;
        cin>>t1;
        t1+=4;
        query(m,1);
        int t2;
        cin>>t2;
        t2+=2;
        int sumy=(t1+t2-2*m)/2;
        int midy=sumy/2;
        query(1,midy);
        int t3;
        cin>>t3;
        t3+=2;
        int y1=(t1-t3)/2;
        int y2=sumy-y1;
        int sumx=t1-y1-y2;
        int midx=sumx/2;
        query(midx,1);
        int t4;
        cin>>t4;
        t4+=2;
        int x2=(sumx+t4-y1-y2)/2;
        int x1=sumx-x2;
        dig(x1,y1);
        int flag;
        cin>>flag;
        if(flag)
        {
            dig(x2,y2);
            cin>>flag;
        }
        else 
        {
            dig(x1,y2);
            cin>>flag;
            dig(x2,y1);
            cin>>flag;
        }
    }
    signed main()
    {
        int T;
        cin>>T;
        while(T--) solve();
    }

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 1ms
memory: 3636kb

input:

1
2 3
3

output:

SCAN 1 1
SCAN 3 1

result:

wrong answer Integer 3 violates the range [1, 2] (test case 1)