Submission #208186

#TimeUsernameProblemLanguageResultExecution timeMemory
208186E869120Scissors and Tape (CEOI19_scissors)C++14
5 / 100
1075 ms14776 KiB
#include <iostream> #include <vector> #include <algorithm> using namespace std; #pragma warning (disable: 4996) int N; vector<pair<int, int>> X; int M; vector<pair<int, int>> Y; int main() { //FILE* in = freopen("in1.txt", "r", stdin); //FILE* out = freopen("out1.txt", "w", stdout); // ステップ 1. 入力 cin >> N; X.resize(N, make_pair(0, 0)); for (int i = 0; i < N; i++) cin >> X[i].first >> X[i].second; cin >> M; Y.resize(M, make_pair(0, 0)); for (int i = 0; i < M; i++) cin >> Y[i].first >> Y[i].second; // ステップ 2. 最大座標を求める int ax = 0, ay = 0; for (int i = 0; i < N; i++) { ax = max(ax, X[i].first); ay = max(ay, X[i].second); } int bx = 0, by = 0; for (int i = 0; i < M; i++) { bx = max(bx, Y[i].first); by = max(by, Y[i].second); } // ステップ 3. 出力 cout << "scissors" << endl; cout << "0 " << ax * ay << endl; for (int i = 0; i < ax; i++) { for (int j = 0; j < ay; j++) { cout << 4 << " " << i << " " << j << " " << i + 1 << " " << j << " " << i + 1 << " " << j + 1 << " " << i << " " << j + 1 << endl; } } cout << "tape" << endl; cout << ax * ay; for (int i = 0; i < ax * ay; i++) cout << " " << i + 1; cout << endl; for (int i = 0; i < bx; i++) { for (int j = 0; j < by; j++) { cout << 4 << " " << i << " " << j << " " << i + 1 << " " << j << " " << i + 1 << " " << j + 1 << " " << i << " " << j + 1 << endl; } } cout << 4 << " " << 0 << " " << 0 << " " << bx << " " << 0 << " " << bx << " " << by << " " << 0 << " " << by << endl; return 0; }

Compilation message (stderr)

scissors.cpp:5:0: warning: ignoring #pragma warning  [-Wunknown-pragmas]
 #pragma warning (disable: 4996)
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...