# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
242913 |
2020-06-29T19:17:26 Z |
MatesV13 |
Pick (COI18_pick) |
C++11 |
|
5 ms |
384 KB |
#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 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 |
4 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 |
384 KB |
not a valid stick |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
5 ms |
384 KB |
not a valid stick |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
5 ms |
384 KB |
not a valid stick |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
5 ms |
384 KB |
not a valid stick |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
5 ms |
384 KB |
not a valid stick |
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 |
4 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 |
384 KB |
not a valid stick |
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 |
4 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 |
384 KB |
not a valid stick |
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 |
4 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 |
384 KB |
not a valid stick |
10 |
Halted |
0 ms |
0 KB |
- |