QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#426469 | #6320. Parallel Processing (Hard) | Kevin5307 | WA | 0ms | 3624kb | C++23 | 732b | 2024-05-31 12:27:34 | 2024-05-31 12:27:35 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
int main()
{
int id,n;
cin>>n;
int s=(int)(ceil(0.4*(n-1)));
cout<<s<<endl;
vector<array<int,3>> vec;
auto print=[&](int a,int b,int c)
{
vec.push_back({c,a,b});
};
for(int i=1;i<n;i+=10)
{
print(i,i+1,i+1);
print(i+2,i+3,i+3);
print(i+4,i+5,i+5);
print(i+7,i+8,i+8);
print(i+1,i+2,i+2);
print(i+1,i+3,i+3);
print(i+5,i+6,i+6);
print(i+8,i+9,i+9);
print(i+3,i+4,i+4);
print(i+3,i+5,i+5);
print(i+3,i+6,i+6);
print(i+9,i+10,i+10);
print(i+6,i+7,i+7);
print(i+6,i+8,i+8);
print(i+6,i+9,i+9);
print(i+6,i+10,i+10);
}
for(int i=0;i<s*4;i++)
cout<<vec[i][0]<<" "<<vec[i][1]<<" "<<vec[i][2]<<endl;
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3624kb
input:
17
output:
7 2 1 2 4 3 4 6 5 6 9 8 9 3 2 3 4 2 4 7 6 7 10 9 10 5 4 5 6 4 6 7 4 7 11 10 11 8 7 8 9 7 9 10 7 10 11 7 11 12 11 12 14 13 14 16 15 16 19 18 19 13 12 13 14 12 14 17 16 17 20 19 20 15 14 15 16 14 16 17 14 17 21 20 21
result:
ok AC
Test #2:
score: -100
Wrong Answer
time: 0ms
memory: 3608kb
input:
18
output:
7 2 1 2 4 3 4 6 5 6 9 8 9 3 2 3 4 2 4 7 6 7 10 9 10 5 4 5 6 4 6 7 4 7 11 10 11 8 7 8 9 7 9 10 7 10 11 7 11 12 11 12 14 13 14 16 15 16 19 18 19 13 12 13 14 12 14 17 16 17 20 19 20 15 14 15 16 14 16 17 14 17 21 20 21
result:
wrong answer A[18] is not (1, …, 18)