QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#514757 | #7637. Exactly Three Neighbors | Alex_wcq | AC ✓ | 0ms | 3848kb | C++14 | 1.9kb | 2024-08-11 09:58:27 | 2024-08-11 09:58:27 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
int main(){
int p,q; scanf("%d%d",&p,&q);
if(p==0) puts("1 1\n.");
else if(q== 1&&p==1) puts("-1 -1");
else if(q== 2&&p==1) puts("1 4\n##..");
else if(q== 3&&p==1) puts("1 6\n##....");
else if(q== 3&&p==2) puts("1 6\n##.##.");
else if(q== 4&&p==1) puts("1 8\n##......");
else if(q== 4&&p==3) puts("4 4\n..##\n####\n##..\n####");
else if(q== 5&&p==1) puts("1 10\n##........");
else if(q== 5&&p==2) puts("1 10\n##.##.....");
else if(q== 5&&p==3) puts("1 10\n##.##.##..");
else if(q== 5&&p==4) puts("5 5\n##.##\n####.\n#.###\n###.#\n.####");
else if(q== 6&&p==1) puts("1 12\n##..........");
else if(q== 6&&p==5) puts("-1 -1");
else if(q== 7&&p==1) puts("1 14\n##............");
else if(q== 7&&p==2) puts("1 14\n##.##.........");
else if(q== 7&&p==3) puts("1 14\n##.##.##......");
else if(q== 7&&p==4) puts("1 14\n##.##.##.##...");
else if(q== 7&&p==5) puts("7 6\n####..\n####..\n#..###\n######\n.##...\n######\n#..###");
else if(q== 7&&p==6) puts("-1 -1");
else if(q== 8&&p==1) puts("1 16\n##..............");
else if(q== 8&&p==3) puts("1 16\n##.##.##........");
else if(q== 8&&p==5) puts("1 16\n##.##.##.##.##..");
else if(q== 8&&p==7) puts("-1 -1");
else if(q== 9&&p==1) puts("1 18\n##................");
else if(q== 9&&p==2) puts("1 18\n##.##.............");
else if(q== 9&&p==4) puts("1 18\n##.##.##.##.......");
else if(q== 9&&p==5) puts("1 18\n##.##.##.##.##....");
else if(q== 9&&p==7) puts("18 6\n####..\n#.####\n###.##\n.####.\n##.###\n####.#\n..####\n###.##\n#####.\n#..###\n####.#\n.#####\n##..##\n#####.\n#.####\n###..#\n.#####\n##.###");
else if(q== 9&&p==8) puts("-1 -1");
else if(q==10&&p==1) puts("1 20\n##..................");
else if(q==10&&p==3) puts("1 20\n##.##.##............");
else if(q==10&&p==7) puts("5 4\n..##\n####\n##..\n##..\n####");
else if(q==10&&p==9) puts("-1 -1");
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3624kb
input:
2 3
output:
1 6 ##.##.
result:
ok good solution
Test #2:
score: 0
Accepted
time: 0ms
memory: 3772kb
input:
1 1
output:
-1 -1
result:
ok no solution
Test #3:
score: 0
Accepted
time: 0ms
memory: 3684kb
input:
3 4
output:
4 4 ..## #### ##.. ####
result:
ok good solution
Test #4:
score: 0
Accepted
time: 0ms
memory: 3820kb
input:
3 5
output:
1 10 ##.##.##..
result:
ok good solution
Test #5:
score: 0
Accepted
time: 0ms
memory: 3672kb
input:
4 5
output:
5 5 ##.## ####. #.### ###.# .####
result:
ok good solution
Test #6:
score: 0
Accepted
time: 0ms
memory: 3640kb
input:
7 10
output:
5 4 ..## #### ##.. ##.. ####
result:
ok good solution
Test #7:
score: 0
Accepted
time: 0ms
memory: 3740kb
input:
5 7
output:
7 6 ####.. ####.. #..### ###### .##... ###### #..###
result:
ok good solution
Test #8:
score: 0
Accepted
time: 0ms
memory: 3636kb
input:
7 9
output:
18 6 ####.. #.#### ###.## .####. ##.### ####.# ..#### ###.## #####. #..### ####.# .##### ##..## #####. #.#### ###..# .##### ##.###
result:
ok good solution
Test #9:
score: 0
Accepted
time: 0ms
memory: 3576kb
input:
0 1
output:
1 1 .
result:
ok good solution
Test #10:
score: 0
Accepted
time: 0ms
memory: 3580kb
input:
1 2
output:
1 4 ##..
result:
ok good solution
Test #11:
score: 0
Accepted
time: 0ms
memory: 3760kb
input:
1 3
output:
1 6 ##....
result:
ok good solution
Test #12:
score: 0
Accepted
time: 0ms
memory: 3568kb
input:
1 4
output:
1 8 ##......
result:
ok good solution
Test #13:
score: 0
Accepted
time: 0ms
memory: 3572kb
input:
1 5
output:
1 10 ##........
result:
ok good solution
Test #14:
score: 0
Accepted
time: 0ms
memory: 3760kb
input:
1 6
output:
1 12 ##..........
result:
ok good solution
Test #15:
score: 0
Accepted
time: 0ms
memory: 3708kb
input:
1 7
output:
1 14 ##............
result:
ok good solution
Test #16:
score: 0
Accepted
time: 0ms
memory: 3844kb
input:
1 8
output:
1 16 ##..............
result:
ok good solution
Test #17:
score: 0
Accepted
time: 0ms
memory: 3672kb
input:
1 9
output:
1 18 ##................
result:
ok good solution
Test #18:
score: 0
Accepted
time: 0ms
memory: 3696kb
input:
1 10
output:
1 20 ##..................
result:
ok good solution
Test #19:
score: 0
Accepted
time: 0ms
memory: 3848kb
input:
2 5
output:
1 10 ##.##.....
result:
ok good solution
Test #20:
score: 0
Accepted
time: 0ms
memory: 3820kb
input:
2 7
output:
1 14 ##.##.........
result:
ok good solution
Test #21:
score: 0
Accepted
time: 0ms
memory: 3820kb
input:
2 9
output:
1 18 ##.##.............
result:
ok good solution
Test #22:
score: 0
Accepted
time: 0ms
memory: 3628kb
input:
3 7
output:
1 14 ##.##.##......
result:
ok good solution
Test #23:
score: 0
Accepted
time: 0ms
memory: 3772kb
input:
3 8
output:
1 16 ##.##.##........
result:
ok good solution
Test #24:
score: 0
Accepted
time: 0ms
memory: 3624kb
input:
3 10
output:
1 20 ##.##.##............
result:
ok good solution
Test #25:
score: 0
Accepted
time: 0ms
memory: 3692kb
input:
4 7
output:
1 14 ##.##.##.##...
result:
ok good solution
Test #26:
score: 0
Accepted
time: 0ms
memory: 3772kb
input:
4 9
output:
1 18 ##.##.##.##.......
result:
ok good solution
Test #27:
score: 0
Accepted
time: 0ms
memory: 3824kb
input:
5 6
output:
-1 -1
result:
ok no solution
Test #28:
score: 0
Accepted
time: 0ms
memory: 3756kb
input:
5 8
output:
1 16 ##.##.##.##.##..
result:
ok good solution
Test #29:
score: 0
Accepted
time: 0ms
memory: 3712kb
input:
5 9
output:
1 18 ##.##.##.##.##....
result:
ok good solution
Test #30:
score: 0
Accepted
time: 0ms
memory: 3840kb
input:
6 7
output:
-1 -1
result:
ok no solution
Test #31:
score: 0
Accepted
time: 0ms
memory: 3824kb
input:
7 8
output:
-1 -1
result:
ok no solution
Test #32:
score: 0
Accepted
time: 0ms
memory: 3696kb
input:
8 9
output:
-1 -1
result:
ok no solution
Test #33:
score: 0
Accepted
time: 0ms
memory: 3768kb
input:
9 10
output:
-1 -1
result:
ok no solution
Extra Test:
score: 0
Extra Test Passed