QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#89431#5419. TrianglesIanD#WA 3ms3584kbC++141.7kb2023-03-20 04:45:092023-03-20 04:45:13

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:45:13]
  • 评测
  • 测评结果:WA
  • 用时:3ms
  • 内存:3584kb
  • [2023-03-20 04:45:09]
  • 提交

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

详细

Test #1:

score: 100
Accepted
time: 3ms
memory: 3444kb

input:

2

output:

No

result:

ok no solution

Test #2:

score: 0
Accepted
time: 1ms
memory: 3584kb

input:

24

output:

Yes
800000000 800000000 1000000000 650000000 1000000000 1000000000
800000000 800000000 1000000000 1000000000 650000000 1000000000
800000000 800000000 650000000 1000000000 600000000 700000000
800000000 800000000 600000000 700000000 800000000 600000000
0 0 500000000 0 400000000 300000000
800000000 600...

result:

ok 24 acute triangles

Test #3:

score: 0
Accepted
time: 2ms
memory: 3384kb

input:

1

output:

No

result:

ok no solution

Test #4:

score: 0
Accepted
time: 2ms
memory: 3384kb

input:

3

output:

No

result:

ok no solution

Test #5:

score: 0
Accepted
time: 2ms
memory: 3348kb

input:

4

output:

No

result:

ok no solution

Test #6:

score: 0
Accepted
time: 1ms
memory: 3404kb

input:

5

output:

No

result:

ok no solution

Test #7:

score: 0
Accepted
time: 2ms
memory: 3348kb

input:

6

output:

No

result:

ok no solution

Test #8:

score: 0
Accepted
time: 2ms
memory: 3348kb

input:

7

output:

No

result:

ok no solution

Test #9:

score: 0
Accepted
time: 0ms
memory: 3568kb

input:

8

output:

Yes
0 0 450000000 200000000 0 1000000000
0 1000000000 450000000 200000000 500000000 1000000000
500000000 1000000000 450000000 200000000 550000000 200000000
500000000 1000000000 550000000 200000000 1000000000 1000000000
1000000000 0 1000000000 1000000000 550000000 200000000
0 0 500000000 0 450000000 ...

result:

ok 8 acute triangles

Test #10:

score: 0
Accepted
time: 0ms
memory: 3580kb

input:

9

output:

Yes
0 0 1000000000 0 800000000 600000000
0 0 800000000 600000000 0 1000000000
0 1000000000 600000000 700000000 650000000 1000000000
1000000000 0 1000000000 650000000 800000000 600000000
800000000 800000000 800000000 600000000 1000000000 650000000
800000000 800000000 1000000000 650000000 1000000000 1...

result:

ok 9 acute triangles

Test #11:

score: -100
Wrong Answer
time: 0ms
memory: 3584kb

input:

10

output:

Yes
0 0 -1794967296 2000000000 0 705032704
705032704 0 -1794967296 2000000000 705032704 705032704
0 705032704 -1794967296 2000000000 705032704 705032704
0 0 2000000000 0 1250000000 1000000000
500000000 150000000 250000000 200000000 400000000 0
500000000 150000000 500000000 400000000 250000000 200000...

result:

wrong answer Integer parameter [name=x] equals to -1794967296, violates the range [0, 10^9]