QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#473133 | #7758. Painter | yzhang | WA | 0ms | 3584kb | C++14 | 1.1kb | 2024-07-11 22:13:24 | 2024-07-11 22:13:24 |
Judging History
answer
#include<bits/stdc++.h>
#define N 2005
using namespace std;
int n,tp[N],px[N],py[N],qx[N],qy[N];
string s,c[N];
int main(){
ios::sync_with_stdio(0);
cin.tie(0);
cin>>n;
for(int i=1;i<=n;++i){
cin>>s;
if(s[0]=='C'){
tp[i]=0;
cin>>px[i]>>py[i]>>qx[i]>>c[i];
}else if(s[2]=='c'){
tp[i]=1;
cin>>px[i]>>py[i]>>qx[i]>>qy[i]>>c[i];
}else{
tp[i]=2;
cin>>px[i]>>py[i]>>qx[i]>>qy[i];
for(int y=qy[i];y>=qx[i];--y){
for(int x=px[i];x<=qx[i];++x){
string ch=".";
for(int j=1;j<i;++j){
if(tp[j]==0){
if(1ll*(px[j]-x)*(px[j]-x)+1ll*(py[j]-y)*(py[j]-y)<=1ll*qx[j]*qx[j]) ch=c[j];
}
if(tp[j]==1){
if(px[j]<=x&&x<=qx[j]&&py[j]<=y&&y<=qy[j]) ch=c[j];
}
}
cout<<ch;
}
cout<<'\n';
}
}
}
return 0;
}
詳細信息
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3584kb
input:
7 Circle 0 0 5 * Circle -2 2 1 @ Circle 2 2 1 @ Rectangle 0 -1 0 0 ^ Rectangle -2 -2 2 -2 _ Render -5 -5 5 5 Render -1 0 1 2
output:
.....*..... @*@ ***
result:
wrong answer 2nd lines differ - expected: '..*******..', found: '@*@'