QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#443632#7637. Exactly Three Neighborsjinqihao2023WA 0ms3748kbC++14657b2024-06-15 16:08:332024-06-15 16:08:34

Judging History

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

  • [2024-06-15 16:08:34]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3748kb
  • [2024-06-15 16:08:33]
  • 提交

answer

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

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3748kb

input:

2 3

output:

##.##.

result:

wrong output format Expected integer, but "##.##." found