QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#446109#7637. Exactly Three Neighbors_l_l_WA 0ms3828kbC++14941b2024-06-16 21:35:172024-06-16 21:35:18

Judging History

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

  • [2024-06-16 21:35:18]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3828kb
  • [2024-06-16 21:35:17]
  • 提交

answer

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

详细

Test #1:

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

input:

2 3

output:

1 6
.##.##

result:

ok good solution

Test #2:

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

input:

1 1

output:

-1 -1

result:

ok no solution

Test #3:

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

input:

3 4

output:

4 4
###.
###.
#.##
#.##

result:

ok good solution

Test #4:

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

input:

3 5

output:

1 10
.##.##.##.

result:

ok good solution

Test #5:

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

input:

4 5

output:

5 5
.####
###.#
#.###
####.
##.##

result:

ok good solution

Test #6:

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

input:

7 10

output:


result:

wrong output format Unexpected end of file - int32 expected