#include <bits/stdc++.h>
#define x first
#define y second
using namespace std;
int id, X1, X2, Y1, Y2;
int nowx, nowy;
vector <pair <int, int>> points, require;
vector <vector <pair <int, int>>> shapes;
vector <int> idlist;
void scissors(int idA, vector <vector <pair <int, int>>> remains) {
cout << "scissors\n";
cout << idA << ' ' << remains.size() << '\n';
shapes.pop_back();
idlist.pop_back();
nowx = 0;
nowy = 0;
for(auto shape : remains) {
cout << shape.size() << ' ';
for(auto [x, y] : shape) {
cout << x << ' ' << y << ' ';
}
cout << '\n';
for(auto &[x, y] : shape) {
x -= nowx;
y += nowy;
}
shapes.push_back(shape);
id++;
idlist.push_back(id);
nowx += X2;
nowy += Y1;
}
}
void tape() {
cout << "tape\n";
cout << shapes.size() << ' ';
for(auto i : idlist) {
cout << i << ' ';
}
cout << '\n';
for(auto shape : shapes) {
cout << shape.size() << ' ';
for(auto [x, y] : shape) {
cout << x << ' ' << y << ' ';
}
cout << '\n';
}
cout << require.size() << ' ';
for(auto [x, y] : require) {
cout << x << ' ' << y << ' ';
}
}
int main() {
cin.tie(nullptr)->sync_with_stdio(false);
int N;
cin >> N;
while(N--) {
int x, y;
cin >> x >> y;
if(x > 0 and y > 0) {
X1 = x, Y1 = y;
}
points.emplace_back(x, y);
}
idlist.push_back(id);
shapes.push_back(points);
cin >> N;
while(N--) {
int x, y;
cin >> x >> y;
if(x > 0 and y > 0) {
X2 = x, Y2 = y;
}
require.emplace_back(x, y);
}
vector <vector <pair <int, int>>> remains;
remains.push_back({{0, 0}, {X2, 0}, {X2, Y1}, {0, Y1}});
nowx = X2;
while(X1 > X2) {
remains.push_back({{nowx, 0}, {nowx + X2, 0}, {nowx + X2, Y1}, {nowx, Y1}});
nowx += X2;
X1 -= X2;
}
if(remains.size() > 1) {
scissors(id, remains);
tape();
}
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
Operation 1 (tape), polygon 0, vertex 0: Equivalent polygons must not change distance of any side by more than 0.001000, got '3.000000' vs '4.000000', error '0.333333' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
Operation 1 (scissors): Total area changed from '38025000000.000000' to '47531250000.000000', error '0.250000' (allowed 0.001000) |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
Operation 1 (tape), polygon 0, vertex 0: Equivalent polygons must not change distance of any side by more than 0.001000, got '3.000000' vs '4.000000', error '0.333333' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
Operation 1 (tape), polygon 0: Equivalent polygons must have same number of vertices (3 != 4) |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
Operation 1 (tape), polygon 0, vertex 0: Equivalent polygons must not change cosine of any internal angle by more than 0.001000, got '0.081922' vs '0.429625', error '0.347702' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
Operation 1 (tape), polygon 0, vertex 0: Equivalent polygons must not change distance of any side by more than 0.001000, got '3.000000' vs '4.000000', error '0.333333' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
Operation 1 (tape), polygon 0, vertex 0: Equivalent polygons must not change distance of any side by more than 0.001000, got '3.000000' vs '4.000000', error '0.333333' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
Operation 1 (tape), polygon 0, vertex 0: Equivalent polygons must not change distance of any side by more than 0.001000, got '3.000000' vs '4.000000', error '0.333333' |
2 |
Halted |
0 ms |
0 KB |
- |