QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#87198#1893. Friendly RooksMaram#WA 2ms3464kbC++14921b2023-03-11 22:39:292023-03-11 22:39:32

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-03-11 22:39:32]
  • 评测
  • 测评结果:WA
  • 用时:2ms
  • 内存:3464kb
  • [2023-03-11 22:39:29]
  • 提交

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;

}

Details

Tip: Click on the bar to expand more detailed information

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