Submission #502569

# Submission time Handle Problem Language Result Execution time Memory
502569 2022-01-06T09:07:41 Z InternetPerson10 Scissors and Tape (CEOI19_scissors) C++17
5 / 100
1000 ms 549576 KB
#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 = initialShape[4]; 
    int initialHeight = initialShape[5]; 
    int finalWidth = finalShape[4]; 
    int finalHeight = 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);
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 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 1 ms 284 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 0 ms 204 KB used 172 vertices, largest error was 0.00000000960000
7 Correct 1 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
# Verdict Execution time Memory Grader output
1 Execution timed out 1113 ms 533352 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 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 1 ms 284 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 0 ms 204 KB used 172 vertices, largest error was 0.00000000960000
7 Correct 1 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 1113 ms 533352 KB Time limit exceeded
12 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 1090 ms 526292 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 1118 ms 549576 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 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 1 ms 284 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 0 ms 204 KB used 172 vertices, largest error was 0.00000000960000
7 Correct 1 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 1113 ms 533352 KB Time limit exceeded
12 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 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 1 ms 284 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 0 ms 204 KB used 172 vertices, largest error was 0.00000000960000
7 Correct 1 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 1113 ms 533352 KB Time limit exceeded
12 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 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 1 ms 284 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 0 ms 204 KB used 172 vertices, largest error was 0.00000000960000
7 Correct 1 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 1113 ms 533352 KB Time limit exceeded
12 Halted 0 ms 0 KB -