QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#60059#1893. Friendly RooksSa3tElSefr#WA 2ms3716kbC++231.6kb2022-11-02 19:35:002022-11-02 19:35:03

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2022-11-02 19:35:03]
  • 评测
  • 测评结果:WA
  • 用时:2ms
  • 内存:3716kb
  • [2022-11-02 19:35:00]
  • 提交

answer

#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <cmath>
#include <vector>
#include <set>
#include <map>
#include <stack>
#include <unordered_set>
#include <unordered_map>
#include <queue>
#include <ctime>
#include <cassert>
#include <complex>
#include <string>
#include <cstring>
#include <chrono>
#include <random>
#include <bitset>
#include <array>
#include <climits>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <cmath>
#include <vector>
#include <set>
#include <map>
#include <stack>
#include <unordered_set>
#include <unordered_map>
#include <queue>
#include <ctime>
#include <cassert>
#include <complex>
#include <string>
#include <cstring>
#include <chrono>
#include <random>
#include <bitset>
#include <array>
#include <climits>

//#pragma GCC optimize("O3")
//#pragma GCC optimize ("unroll-loops")
//#pragma GCC target("avx,avx2,fma")

#define ll long long
#define ld  double
using namespace std;

const int N = 5e2 + 5, lg = 19, mod = 998244353;
const int M = 1e6 + 5;
const int b = 31;


int main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    int n, m, k;
    cin >> n >> m >> k;
    if (min(n, m) < k) {
        cout << "Impossible\n";
        return 0;
    }
    cout << "Possible\n";
    for (int i = 0; i < n; ++i) {
        for (int j = 0; j < m; ++j) {
            if (k && i == j) {
                cout << '*';
            } else {
                cout << '.';
            }
        }
        cout << '\n';
    }
    return 0;
}

詳細信息

Test #1:

score: 100
Accepted
time: 0ms
memory: 3716kb

input:

1 2 1

output:

Possible
*.

result:

ok n = 1, m = 2, k = 1

Test #2:

score: 0
Accepted
time: 2ms
memory: 3516kb

input:

3 3 100

output:

Impossible

result:

ok n = 3, m = 3, k = 100

Test #3:

score: -100
Wrong Answer
time: 2ms
memory: 3656kb

input:

3 5 2

output:

Possible
*....
.*...
..*..

result:

wrong answer Wrong number of rooks: 2 expected, 3 found