Submission #240857

# Submission time Handle Problem Language Result Execution time Memory
240857 2020-06-21T10:05:48 Z NONAME Pick (COI18_pick) C++14
10 / 100
5 ms 416 KB
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;

void print(int _x, int _y) { cout << _x << " " << _y << "\n"; }

int a, b, c, d;

int main() {
    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);

    cin >> a >> b >> c >> d;
    
    if (c == d && c == 0) {
        int x = 0, y = 0;
        print(x, y);
        
        for (int i = 0; i < a / 2; ++i) {
            --x;
            print(x, y);
        }
        
        for (int i = 0; i < b / 2; ++i) {
            ++y;
            print(x, y);
        }
        
        for (int i = 0; i < a / 2; ++i) {
            ++x;
            print(x, y);
        }
        
        for (int i = 0; i < b / 2 - 1; ++i) {
            --y;
            print(x, y);
        }
    } else {
        int x = 0, y = 0;
        print(x, y);
        
        for (int i = 0; i < c / 2; ++i) {
            ++x, ++y;
            print(x, y);
        }
        
        for (int i = 0; i < d / 2; ++i) {
            --x, ++y;
            print(x, y);
        }
        
        for (int i = 0; i < c / 2; ++i) {
            --x, --y;
            print(x, y);
        }
        
        for (int i = 0; i < d / 2 - 1; ++i) {
            ++x, --y;
            print(x, y);
        }
    }
}
# Verdict Execution time Memory Grader output
1 Correct 5 ms 384 KB Output is correct
2 Correct 5 ms 384 KB Output is correct
3 Correct 5 ms 384 KB Output is correct
4 Correct 5 ms 384 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 5 ms 384 KB Output is correct
2 Correct 5 ms 384 KB Output is correct
3 Correct 5 ms 384 KB Output is correct
4 Correct 5 ms 384 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 416 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 416 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 416 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 416 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 416 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 5 ms 384 KB Output is correct
2 Correct 5 ms 384 KB Output is correct
3 Correct 5 ms 384 KB Output is correct
4 Correct 5 ms 384 KB Output is correct
5 Correct 5 ms 384 KB Output is correct
6 Correct 5 ms 384 KB Output is correct
7 Correct 5 ms 384 KB Output is correct
8 Correct 5 ms 384 KB Output is correct
9 Incorrect 5 ms 416 KB Unexpected end of file - int32 expected
10 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 5 ms 384 KB Output is correct
2 Correct 5 ms 384 KB Output is correct
3 Correct 5 ms 384 KB Output is correct
4 Correct 5 ms 384 KB Output is correct
5 Correct 5 ms 384 KB Output is correct
6 Correct 5 ms 384 KB Output is correct
7 Correct 5 ms 384 KB Output is correct
8 Correct 5 ms 384 KB Output is correct
9 Incorrect 5 ms 416 KB Unexpected end of file - int32 expected
10 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 5 ms 384 KB Output is correct
2 Correct 5 ms 384 KB Output is correct
3 Correct 5 ms 384 KB Output is correct
4 Correct 5 ms 384 KB Output is correct
5 Correct 5 ms 384 KB Output is correct
6 Correct 5 ms 384 KB Output is correct
7 Correct 5 ms 384 KB Output is correct
8 Correct 5 ms 384 KB Output is correct
9 Incorrect 5 ms 416 KB Unexpected end of file - int32 expected
10 Halted 0 ms 0 KB -