QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#99531 | #6319. Parallel Processing (Easy) | Sorting# | Compile Error | / | / | C++23 | 3.5kb | 2023-04-22 22:06:40 | 2023-04-22 22:06:43 |
Judging History
你现在查看的是最新测评结果
- [2023-08-10 23:21:45]
- System Update: QOJ starts to keep a history of the judgings of all the submissions.
- [2023-04-22 22:06:43]
- 评测
- 测评结果:Compile Error
- 用时:0ms
- 内存:0kb
- [2023-04-22 22:06:40]
- 提交
answer
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
template<class T> void check_min(T &a, const T &b){ a = (a < b) ? a : b; }
template<class T> void check_max(T &a, const T &b){ a = (a > b) ? a : b; }
#define all(x) (x).begin(), (x).end()
void output(vector<vector<array<int, 3>>> ins){
cout << ins.size() << "\n";
for(auto v: ins){
for(auto [a, b, c]: v)
cout << a << " " << b << " " << c << "\n";
}
exit(0);
}
void fix_add(vector<array<int, 3>> &add){
while(add.size() != 4){
add.push_back({2000, 2000, 2000});
}
}
int main(){
ios::sync_with_stdio(false);
cin.tie(NULL);
int n;
cin >> n;
vector<vector<array<int, 3>>> ins{
{
{2, 1, 2},
{4, 3, 4},
{6, 5, 6},
{8, 7, 8},
},
{
{3, 2, 3},
{4, 2, 4},
{7, 6, 7},
{8, 6, 8},
},
{
{5, 4, 5},
{6, 4, 6},
{7, 4, 7},
{8, 4, 8},
}
};
if(n <= 8){
if(n <= 2){
ins.resize(1);
output(ins);
}
if(n <= 4){
ins.resize(2);
output(ins);
}
output(ins);
}
ins.clear();
typedef vector<array<int, 3>> vec;
if(n <= 11){
ins.push_back(vec{
{2, 1, 2},
{4, 3, 4},
{6, 5, 6},
{9, 8, 9},
});
ins.push_back({
{4, 2, 4},
{7, 6, 7},
{10, 9, 10},
{3, 2, 3},
});
ins.push_back({
{5, 4, 5},
{6, 4, 6},
{7, 4, 7},
{11, 10, 11},
});
ins.push_back({
{8, 7, 8},
{9, 7, 9},
{10, 7, 10},
{11, 7, 11},
});
output(ins);
}
if(n <= 13){
ins.push_back({
{2, 1, 2},
{4, 3, 4},
{6, 5, 6},
{9, 8, 9},
});
ins.push_back({
{4, 2, 4},
{7, 6, 7},
{10, 9, 10},
{12, 11, 12},
});
ins.push_back({
{5, 4, 5},
{6, 4, 6},
{7, 4, 7},
{13, 12 13}
});
ins.push_back({
{8, 7, 8},
{9, 7, 9},
{10, 7, 10},
{3, 2, 3}
});
ins.push_back({
{11, 10, 11},
{12, 10, 12},
{13, 10, 13},
{2000, 2000, 2000}
});
output(ins);
}
if(n <= 16){
ins.push_back({
{2, 1, 2},
{4, 3, 4},
{6, 5, 6},
{9, 8, 9},
});
ins.push_back({
{4, 2, 4},
{7, 6, 7},
{10, 9, 10},
{12, 11, 12},
});
ins.push_back({
{5, 4, 5},
{6, 4, 6},
{7, 4, 7},
{13, 12, 13}
});
ins.push_back({
{8, 7, 8},
{9, 7, 9},
{10, 7, 10},
{15, 14, 15}
});
ins.push_back({
{11, 10, 11},
{12, 10, 12},
{13, 10, 13},
{16, 15, 16}
});
ins.push_back({
{14, 13, 14},
{15, 13, 15},
{16, 13, 16},
{3, 2, 3}
});
output(ins);
}
}
详细
answer.code: In function ‘int main()’: answer.code:113:21: error: expected ‘}’ before numeric constant 113 | {13, 12 13} | ~ ^~ answer.code:113:21: error: expected ‘}’ before numeric constant answer.code:109:23: note: to match this ‘{’ 109 | ins.push_back({ | ^ answer.code:113:20: error: expected ‘)’ before numeric constant 113 | {13, 12 13} | ^~~ | ) answer.code:109:22: note: to match this ‘(’ 109 | ins.push_back({ | ^ answer.code: At global scope: answer.code:114:10: error: expected unqualified-id before ‘)’ token 114 | }); | ^ answer.code:115:9: error: ‘ins’ does not name a type; did you mean ‘int’? 115 | ins.push_back({ | ^~~ | int answer.code:120:10: error: expected unqualified-id before ‘)’ token 120 | }); | ^ answer.code:121:9: error: ‘ins’ does not name a type; did you mean ‘int’? 121 | ins.push_back({ | ^~~ | int answer.code:126:10: error: expected unqualified-id before ‘)’ token 126 | }); | ^ answer.code:127:15: error: expected constructor, destructor, or type conversion before ‘(’ token 127 | output(ins); | ^ answer.code:128:5: error: expected declaration before ‘}’ token 128 | } | ^ answer.code:129:5: error: expected unqualified-id before ‘if’ 129 | if(n <= 16){ | ^~ answer.code:169:1: error: expected declaration before ‘}’ token 169 | } | ^