QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#65053 | #1893. Friendly Rooks | Xiaoyang | WA | 3ms | 3324kb | C++14 | 777b | 2022-11-26 21:14:59 | 2022-11-26 21:15:02 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
#define fi first
#define se second
#define SZ(x) ((long long)(x).size())
#define rep(i,a,b) for (long long i=(a);i<(b);i++)
#define pq priority_queue
#define MP make_pair
#define pb push_back
#define ALL(x) (x).begin(),(x).end()
#define ll long long
#define pii pair<ll,ll>
#define debug(x) cerr<<#x<<"="<<x<<"\n"
#define endl "\n"
const ll inf=1e18;
const ll mod=1e9+7;
int main(){
ios::sync_with_stdio(0);
cin.tie(0);
ll n,m,k;cin>>n>>m>>k;
if(min(n,m)<k)cout<<"IMPOSSIBLE";
else{
cout<<"POSSIBLE"<<endl;
ll cnt=k;
rep(i,0,n){
rep(j,0,m){
if(i==j and cnt>0)cout<<'*',cnt--;
else cout<<'.';
}cout<<endl;
}
}
return 0;
}
详细
Test #1:
score: 0
Wrong Answer
time: 3ms
memory: 3324kb
input:
1 2 1
output:
POSSIBLE *.
result:
wrong answer Unexpected answer: POSSIBLE