QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#89430 | #5419. Triangles | IanD# | WA | 2ms | 3480kb | C++14 | 1.7kb | 2023-03-20 04:29:49 | 2023-03-20 04:29:52 |
Judging History
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: 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"