Submission #242913

#TimeUsernameProblemLanguageResultExecution timeMemory
242913MatesV13Pick (COI18_pick)C++11
10 / 100
5 ms384 KiB
#include <bits/stdc++.h> using namespace std; long long a, b, c, d, curx, cury, a1, b1, c1, d1; int main (){ ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); cin >> a >> b >> c >> d; curx=0; cury=0; if (c==0 and d==0){ for (int i=0; i<a/2; i++){cout << curx << " " << cury << endl; curx++;} for (int i=0; i<b/2; i++){cout << curx << " " << cury << endl; cury++;} cout << curx << " " << cury << endl; curx--; for (int i=1; i<b/2; i++){cout << curx << " " << cury << endl; cury--;} for (int i=1; i<a/2; i++){cout << curx << " " << cury << endl; curx--;} cout << curx << " " << cury << endl; cury--; } else if (a==0 and b==0){ for (int i=0; i<c/2; i++){cout << curx << " " << cury << endl; curx++; cury++;} for (int i=0; i<d/2; i++){cout << curx << " " << cury << endl; curx--; cury++;} cout << curx << " " << cury << endl; curx--; cury--; for (int i=1; i<d/2; i++){cout << curx << " " << cury << endl; curx++; cury--;} for (int i=1; i<c/2; i++){cout << curx << " " << cury << endl; curx--; cury--;} cout << curx << " " << cury << endl; curx++; cury--; } else{ for (int i=0; i<a; i++){cout << curx << " " << cury << endl; curx++;} for (int i=0; i<b; i++){cout << curx << " " << cury << endl; cury++;} for (int i=0; i<c; i++){cout << curx << " " << cury << endl; curx++; cury++;} for (int i=0; i<d; i++){cout << curx << " " << cury << endl; curx--; cury++;} } return 0; }
#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...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...