#include <bits/stdc++.h>
using namespace std;
void printShape(vector<int> shape) {
cout << shape.size()/2;
for(int g : shape) {
cout << ' ' << g;
}
cout << '\n';
}
vector<vector<int>> shapes;
int currentId = 1;
void scissors(int id, vector<vector<int>> subdivision) {
cout << "scissors\n";
cout << id << ' ' << subdivision.size() << '\n';
for(vector<int> v : subdivision) {
shapes.push_back(v);
printShape(v);
}
}
void tape(vector<int> ids, vector<vector<int>> subdivision, vector<int> finalShape) {
cout << "tape\n";
cout << ids.size();
for(int id : ids) {
cout << ' ' << id;
}
cout << '\n';
for(vector<int> v : subdivision) {
printShape(v);
}
printShape(finalShape);
}
void solve(vector<int> initialShape, vector<int> finalShape) {
vector<vector<int>> initialSquares, finalSquares;
int initialWidth = max(initialShape[0], initialShape[4]);
int initialHeight = max(initialShape[1], initialShape[5]);
int finalWidth = max(finalShape[0], finalShape[4]);
int finalHeight = max(finalShape[1], finalShape[5]);
for(int i = 0; i < initialWidth; i++) {
for(int j = 0; j < initialHeight; j++) {
initialSquares.push_back(vector<int>());
initialSquares.back().push_back(i);
initialSquares.back().push_back(j);
initialSquares.back().push_back(i+1);
initialSquares.back().push_back(j);
initialSquares.back().push_back(i+1);
initialSquares.back().push_back(j+1);
initialSquares.back().push_back(i);
initialSquares.back().push_back(j+1);
}
}
for(int i = 0; i < finalWidth; i++) {
for(int j = 0; j < finalHeight; j++) {
finalSquares.push_back(vector<int>());
finalSquares.back().push_back(i);
finalSquares.back().push_back(j);
finalSquares.back().push_back(i+1);
finalSquares.back().push_back(j);
finalSquares.back().push_back(i+1);
finalSquares.back().push_back(j+1);
finalSquares.back().push_back(i);
finalSquares.back().push_back(j+1);
}
}
scissors(0, initialSquares);
vector<int> ids;
for(int i = 1; i <= initialWidth * initialHeight; i++) {
ids.push_back(i);
}
tape(ids, finalSquares, finalShape);
}
int main() {
int n;
cin >> n;
vector<int> initialShape(2*n);
for(int i = 0; i < 2*n; i++) cin >> initialShape[i];
int m;
cin >> m;
vector<int> finalShape(2*m);
for(int i = 0; i < 2*m; i++) cin >> finalShape[i];
shapes.push_back(initialShape);
solve(initialShape, finalShape);
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
292 KB |
used 204 vertices, largest error was 0.00000000966667 |
2 |
Correct |
0 ms |
204 KB |
used 172 vertices, largest error was 0.00000001150000 |
3 |
Correct |
1 ms |
288 KB |
used 252 vertices, largest error was 0.00000001200000 |
4 |
Correct |
0 ms |
292 KB |
used 140 vertices, largest error was 0.00000001150000 |
5 |
Correct |
0 ms |
204 KB |
used 172 vertices, largest error was 0.00000001150000 |
6 |
Correct |
1 ms |
292 KB |
used 172 vertices, largest error was 0.00000000960000 |
7 |
Correct |
0 ms |
204 KB |
used 92 vertices, largest error was 0.00000000900000 |
8 |
Correct |
0 ms |
204 KB |
used 252 vertices, largest error was 0.00000000966667 |
9 |
Correct |
0 ms |
204 KB |
used 252 vertices, largest error was 0.00000001140000 |
10 |
Correct |
0 ms |
204 KB |
used 44 vertices, largest error was 0.00000000850000 |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Execution timed out |
1102 ms |
506080 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
292 KB |
used 204 vertices, largest error was 0.00000000966667 |
2 |
Correct |
0 ms |
204 KB |
used 172 vertices, largest error was 0.00000001150000 |
3 |
Correct |
1 ms |
288 KB |
used 252 vertices, largest error was 0.00000001200000 |
4 |
Correct |
0 ms |
292 KB |
used 140 vertices, largest error was 0.00000001150000 |
5 |
Correct |
0 ms |
204 KB |
used 172 vertices, largest error was 0.00000001150000 |
6 |
Correct |
1 ms |
292 KB |
used 172 vertices, largest error was 0.00000000960000 |
7 |
Correct |
0 ms |
204 KB |
used 92 vertices, largest error was 0.00000000900000 |
8 |
Correct |
0 ms |
204 KB |
used 252 vertices, largest error was 0.00000000966667 |
9 |
Correct |
0 ms |
204 KB |
used 252 vertices, largest error was 0.00000001140000 |
10 |
Correct |
0 ms |
204 KB |
used 44 vertices, largest error was 0.00000000850000 |
11 |
Execution timed out |
1102 ms |
506080 KB |
Time limit exceeded |
12 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Execution timed out |
1105 ms |
478804 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Execution timed out |
1103 ms |
518052 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
292 KB |
used 204 vertices, largest error was 0.00000000966667 |
2 |
Correct |
0 ms |
204 KB |
used 172 vertices, largest error was 0.00000001150000 |
3 |
Correct |
1 ms |
288 KB |
used 252 vertices, largest error was 0.00000001200000 |
4 |
Correct |
0 ms |
292 KB |
used 140 vertices, largest error was 0.00000001150000 |
5 |
Correct |
0 ms |
204 KB |
used 172 vertices, largest error was 0.00000001150000 |
6 |
Correct |
1 ms |
292 KB |
used 172 vertices, largest error was 0.00000000960000 |
7 |
Correct |
0 ms |
204 KB |
used 92 vertices, largest error was 0.00000000900000 |
8 |
Correct |
0 ms |
204 KB |
used 252 vertices, largest error was 0.00000000966667 |
9 |
Correct |
0 ms |
204 KB |
used 252 vertices, largest error was 0.00000001140000 |
10 |
Correct |
0 ms |
204 KB |
used 44 vertices, largest error was 0.00000000850000 |
11 |
Execution timed out |
1102 ms |
506080 KB |
Time limit exceeded |
12 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
292 KB |
used 204 vertices, largest error was 0.00000000966667 |
2 |
Correct |
0 ms |
204 KB |
used 172 vertices, largest error was 0.00000001150000 |
3 |
Correct |
1 ms |
288 KB |
used 252 vertices, largest error was 0.00000001200000 |
4 |
Correct |
0 ms |
292 KB |
used 140 vertices, largest error was 0.00000001150000 |
5 |
Correct |
0 ms |
204 KB |
used 172 vertices, largest error was 0.00000001150000 |
6 |
Correct |
1 ms |
292 KB |
used 172 vertices, largest error was 0.00000000960000 |
7 |
Correct |
0 ms |
204 KB |
used 92 vertices, largest error was 0.00000000900000 |
8 |
Correct |
0 ms |
204 KB |
used 252 vertices, largest error was 0.00000000966667 |
9 |
Correct |
0 ms |
204 KB |
used 252 vertices, largest error was 0.00000001140000 |
10 |
Correct |
0 ms |
204 KB |
used 44 vertices, largest error was 0.00000000850000 |
11 |
Execution timed out |
1102 ms |
506080 KB |
Time limit exceeded |
12 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
292 KB |
used 204 vertices, largest error was 0.00000000966667 |
2 |
Correct |
0 ms |
204 KB |
used 172 vertices, largest error was 0.00000001150000 |
3 |
Correct |
1 ms |
288 KB |
used 252 vertices, largest error was 0.00000001200000 |
4 |
Correct |
0 ms |
292 KB |
used 140 vertices, largest error was 0.00000001150000 |
5 |
Correct |
0 ms |
204 KB |
used 172 vertices, largest error was 0.00000001150000 |
6 |
Correct |
1 ms |
292 KB |
used 172 vertices, largest error was 0.00000000960000 |
7 |
Correct |
0 ms |
204 KB |
used 92 vertices, largest error was 0.00000000900000 |
8 |
Correct |
0 ms |
204 KB |
used 252 vertices, largest error was 0.00000000966667 |
9 |
Correct |
0 ms |
204 KB |
used 252 vertices, largest error was 0.00000001140000 |
10 |
Correct |
0 ms |
204 KB |
used 44 vertices, largest error was 0.00000000850000 |
11 |
Execution timed out |
1102 ms |
506080 KB |
Time limit exceeded |
12 |
Halted |
0 ms |
0 KB |
- |