QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#446109 | #7637. Exactly Three Neighbors | _l_l_ | WA | 0ms | 3828kb | C++14 | 941b | 2024-06-16 21:35:17 | 2024-06-16 21:35:18 |
Judging History
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