QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#610547 | #7637. Exactly Three Neighbors | Yeyin_0 | WA | 0ms | 3684kb | C++14 | 1.0kb | 2024-10-04 16:25:28 | 2024-10-04 16:25:29 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
#define fo(i,a,b) for(int i=(a);i<=(b);i++)
#define LL long long
int q,p;
int main()
{
cin>>q>>p;
if(p==1&&q==1)
{
cout<<"-1 -1";
return 0;
}
if(q*3<=2*p)
{
cout<<"1 "<<2*p<<endl;
fo(i,1,3*q-3)
{
if(i%3==1||i%3==0)
{
cout<<"#";
}
else cout<<".";
}
cout<<"#";
fo(i,3*q-1,2*p-1) cout<<".";
cout<<"#";
}
else{
if(q==3&&p==4)
{
cout<<"4 4\n";
cout<<"#..#\n"
<<"####\n"
<<".##.\n"
<<"####\n";
}
else if(q==7&&p==10)
{
cout<<"5 4\n";
cout<<"#..#\n"
<<"####\n"
<<".##.\n"
<<".##.\n"
<<"####\n";
}
else cout<<"-1 -1";
}
}
/*
4 6
.####.
##..##
##..##
.####.
*/
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3544kb
input:
2 3
output:
1 6 #.##.#
result:
ok good solution
Test #2:
score: 0
Accepted
time: 0ms
memory: 3612kb
input:
1 1
output:
-1 -1
result:
ok no solution
Test #3:
score: 0
Accepted
time: 0ms
memory: 3556kb
input:
3 4
output:
4 4 #..# #### .##. ####
result:
ok good solution
Test #4:
score: 0
Accepted
time: 0ms
memory: 3684kb
input:
3 5
output:
1 10 #.##.##..#
result:
ok good solution
Test #5:
score: -100
Wrong Answer
time: 0ms
memory: 3612kb
input:
4 5
output:
-1 -1
result:
wrong answer you didn't find a solution but jury did