QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#89430#5419. TrianglesIanD#WA 2ms3480kbC++141.7kb2023-03-20 04:29:492023-03-20 04:29:52

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-03-20 04:29:52]
  • 评测
  • 测评结果:WA
  • 用时:2ms
  • 内存:3480kb
  • [2023-03-20 04:29:49]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
int k;

int A[8][6] = {0, 0, 45, 20, 0, 100, 0, 100, 45, 20, 50, 100, 50, 100, 45, 20, 55, 20, 50, 100, 55, 20, 100, 100, 100, 0, 100, 100, 55, 20, 0, 0, 50, 0, 45, 20, 50, 0, 55, 20, 45, 20, 50, 0, 100, 0, 55, 20};
int B[9][6] = {0, 0, 100, 0, 80, 60, 0, 0, 80, 60, 0, 100, 0, 100, 60, 70, 65, 100, 100, 0, 100, 65, 80, 60, 80, 80, 80, 60, 100, 65, 80, 80, 100, 65, 100, 100, 80, 80, 100, 100, 65, 100, 80, 80, 65, 100, 60, 70, 80, 80, 60, 70, 80, 60};
int C[10][6] = {0, 0, 250, 200, 0, 500, 500, 0, 250, 200, 500, 500, 0, 500, 250, 200, 500, 500, 0, 0, 200, 0, 125, 100, 50, 15, 25, 20, 40, 0, 50, 15, 50, 40, 25, 20, 50, 15, 40, 0, 60, 0, 50, 15, 60, 0, 75, 20, 50, 15, 75, 20, 50, 40, 100, 0, 75, 20, 60, 0};

void gen(auto T[][6],int t){
    queue<vector<int>>q;
    for(int i=0;i<t;i++) {
        vector<int>x;
        for(int j=0;j<6;j++) x.push_back(T[i][j]*((int)1e7));
        q.push(x);
    }
    while(q.size()<k){
        auto x=q.front();
        q.pop();
        int x1=x[0],y1=x[1],x2=x[2],y2=x[3],x3=x[4],y3=x[5];
        q.push({x1,y1,(x1+x2)/2,(y1+y2)/2,(x1+x3)/2,(y1+y3)/2});
        q.push({x3,y3,(x1+x3)/2,(y3+y1)/2,(x2+x3)/2,(y2+y3)/2});
        q.push({x2,y2,(x2+x3)/2,(y2+y3)/2,(x1+x2)/2,(y1+y2)/2});
        q.push({(x1+x2)/2,(y1+y2)/2,(x2+x3)/2,(y2+y3)/2,(x1+x3)/2,(y1+y3)/2});
    }
    for(;!q.empty();){
        auto x=q.front();
        q.pop();
        printf("%d %d %d %d %d %d\n", x[0],x[1],x[2],x[3],x[4],x[5]);
    }
}

int main(){
    cin>>k;
    if(k<8) {cout<<"NO"<<endl;}
    else{
        cout<<"YES"<<endl;
        if(k%3==2) gen(A,8);
        if(k%3==0) gen(B,9);
        if(k%3==1) gen(C,10);
    }
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 2ms
memory: 3480kb

input:

2

output:

NO

result:

wrong answer Token parameter [name=s] equals to "NO", doesn't correspond to pattern "Yes|No"