QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#473133#7758. PainteryzhangWA 0ms3584kbC++141.1kb2024-07-11 22:13:242024-07-11 22:13:24

Judging History

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

  • [2024-07-11 22:13:24]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3584kb
  • [2024-07-11 22:13:24]
  • 提交

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

Details

Tip: Click on the bar to expand more detailed information

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: '@*@'