QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#610437#7637. Exactly Three NeighborswyhaoWA 0ms3888kbC++141.2kb2024-10-04 15:56:202024-10-04 15:56:23

Judging History

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

  • [2024-10-04 15:56:23]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3888kb
  • [2024-10-04 15:56:20]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
int p,q;
int main(){
    scanf("%d%d",&p,&q);
    if(p==0){
        puts("1 1");
        puts(".");
        return 0;
    }
    if(p==1){
        if(q==1){
            puts("-1 -1");
            return 0;
        }
        printf("%d %d\n",1,2*q);
        printf("##..");
        for(int k=3;k<=q;k++) printf("..");
        return 0;
    }
    if(p==2){
        printf("%d %d\n",1,q);
        printf("##");
        for(int k=3;k<=q;k++) printf(".");
        return 0;
    }
    if(p==3){
        if(q<=4){
            puts("-1 -1");
            return 0;
        }
        printf("%d %d\n",1,2*q);
        printf("##.##.##..");
        for(int k=6;k<=q;k++) printf("..");
        return 0;
    }
    if(p==4){
        if(q<=5){
            puts("-1 -1");
            return 0;
        }
        printf("%d %d\n",1,q);
        printf("##.##.");
        for(int k=7;k<=q;k++) printf(".");
        return 0;
    }
    if(p==5){
        if(q<=7){
            puts("-1 -1");
            return 0;
        }
        printf("%d %d\n",1,2*q);
        printf("##.##.##.##.##..");
        for(int k=9;k<=q;k++) printf("..");
        return 0;
    }
    printf("-1 -1");
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

2 3

output:

1 3
##.

result:

ok good solution

Test #2:

score: 0
Accepted
time: 0ms
memory: 3740kb

input:

1 1

output:

-1 -1

result:

ok no solution

Test #3:

score: -100
Wrong Answer
time: 0ms
memory: 3820kb

input:

3 4

output:

-1 -1

result:

wrong answer you didn't find a solution but jury did