QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#87198 | #1893. Friendly Rooks | Maram# | WA | 2ms | 3464kb | C++14 | 921b | 2023-03-11 22:39:29 | 2023-03-11 22:39:32 |
Judging History
answer
#include <iostream>
#include<bits/stdc++.h>
#define int long long
#define FIO ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
using namespace std;
const int N = 1e5 + 20, M = 1e6 + 5;
const int mod = 998244353;
void debug() {
#ifdef Debug
freopen("in.txt","r",stdin);
freopen("out.txt","w",stdout);
#endif
}
void getAnswer()
{
int a, b, k;
cin >> a >> b >> k;
if(k > min(a,b))
cout << "Impossible\n";
else
{
cout << "Possible\n";
for(int i = 0;i < a;++i)
{
for(int j = 0;j < b;++j)
{
if(i == j)
cout << '*';
else
cout << ".";
}
cout << "\n";
}
}
}
signed main()
{
FIO
debug();
int t = 1;
//cin >> t;
while(t--)
getAnswer();
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3460kb
input:
1 2 1
output:
Possible *.
result:
ok n = 1, m = 2, k = 1
Test #2:
score: 0
Accepted
time: 2ms
memory: 3352kb
input:
3 3 100
output:
Impossible
result:
ok n = 3, m = 3, k = 100
Test #3:
score: -100
Wrong Answer
time: 2ms
memory: 3464kb
input:
3 5 2
output:
Possible *.... .*... ..*..
result:
wrong answer Wrong number of rooks: 2 expected, 3 found