QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#65053#1893. Friendly RooksXiaoyangWA 3ms3324kbC++14777b2022-11-26 21:14:592022-11-26 21:15:02

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-26 21:15:02]
  • 评测
  • 测评结果:WA
  • 用时:3ms
  • 内存:3324kb
  • [2022-11-26 21:14:59]
  • 提交

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;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 3ms
memory: 3324kb

input:

1 2 1

output:

POSSIBLE
*.

result:

wrong answer Unexpected answer: POSSIBLE