QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#116012#2043. Make a SequenceNYCU_gAwr_gurA#0 4ms3532kbC++171.5kb2023-06-27 21:46:042023-06-27 21:46:06

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-06-27 21:46:06]
  • 评测
  • 测评结果:0
  • 用时:4ms
  • 内存:3532kb
  • [2023-06-27 21:46:04]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;

#define endl '\n'

signed main() {

    int n,m,p;
    while((cin>>n>>m>>p) && n)
    {
        int arr[15][15][15]={}, nene[15][15]={};
        int a,b,c,ans,aoi;
        ans=aoi=0;
        int j,x,y,z;
        for(int i=0;i<p;i++)
        {
            cin>>a>>b;
            c=++nene[a][b];
            //cout<<"   "<<i%2+1<<' '<<a<<' '<<b<<' '<<c<<endl;
            
            arr[a][b][c]=i%2+1;

            for(x=-1;x<=1;x++)
            {
                for(y=-1;y<=1;y++){
                    for(z=-1;z<=1;z++)
                    {
                        if(!x && !y && !z)
                            continue;
                        for(j=0;j<m-1;j++)
                        {
                            //cout<<"###  "<<j<<endl;
                            if(a+j*x+x<1 || b+j*y+y<1 || c+j*z+z<1)
                                break;
                            //cout<<"ouooououuuou "<<j<<endl;
                            if(arr[a+j*x][b+j*y][c+j*z]!=arr[a+j*x+x][b+j*y+y][c+j*z+z])
                                break;
                            //cout<<"# "<<j<<endl;
                        }
                        if(j==m-1 && !ans)
                            ans=i%2+1, aoi=i+1;
                    }
                }
            }
        }
        if(ans==1)
            cout<<"Black"<<' '<<aoi<<endl;
        else if(ans==2)
            cout<<"White "<<aoi<<endl;
        else
            cout<<"Draw"<<endl;
    }

    return 0;
}

详细

Test #1:

score: 0
Wrong Answer
time: 4ms
memory: 3532kb

input:

3 3 3
1 1
1 1
1 1
3 3 14
1 1
2 2
3 2
3 1
1 3
1 2
1 3
1 3
2 3
3 3
1 2
1 1
3 1
3 1
3 3 5
1 1
1 3
2 1
2 3
3 1
3 3 5
1 1
3 1
1 2
3 2
1 3
3 3 5
1 1
2 2
1 1
2 2
1 1
3 3 5
1 1
3 1
2 2
3 2
3 3
3 3 5
3 1
1 1
2 2
1 2
1 3
3 3 7
1 1
2 1
2 1
3 1
1 1
3 1
3 1
3 3 7
3 1
2 1
2 1
1 1
3 1
1 1
1 1
3 3 7
1 1
1 2
1 2
1 3...

output:

Draw
Draw
Black 5
Black 5
Black 5
Black 5
Black 5
Black 7
Black 7
Black 7
Black 7
Black 7
Black 7
Black 7
Black 7
Black 7
Black 7
Black 7
Black 7
Black 11
Black 11
Black 11
Black 11
Black 11
Black 11
Black 11
Black 11
Black 11
Black 11
Black 13
Black 13
White 8
Black 11
Black 7
White 22
White 10
Whi...

result:

wrong answer 37th lines differ - expected: 'Black 13', found: 'White 20'