# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
243182 |
2020-06-30T13:59:44 Z |
VEGAnn |
Pick (COI18_pick) |
C++14 |
|
5 ms |
384 KB |
#include <bits/stdc++.h>
#define sz(x) ((int)x.size())
#define all(x) x.begin(),x.end()
#define PB push_back
using namespace std;
typedef long double ld;
const int N = 400100;
const ld E = 1e-10;
int a, b, c, d;
int main(){
ios_base::sync_with_stdio(0); cin.tie(0);
#ifdef _LOCAL
freopen("in.txt","r",stdin);
#endif // _LOCAL
cin >> a >> b >> c >> d;
cout << "0 0\n";
if (a == 0 && b == 0){
int x = 0, y = 0;
for (int it = 0; it < c / 2; it++){
x++; y++;
cout << x << " " << y << '\n';
}
x--; y++;
cout << x << " " << y << '\n';
for (int it = 1; it < c / 2; it++){
x--; y--;
cout << x << " " << y << '\n';
}
for (int it = 1; it < d / 2; it++){
x--; y++;
cout << x << " " << y << '\n';
}
x--; y--;
cout << x << " " << y << '\n';
for (int it = 0; it < d / 2; it++){
x++; y--;
if (x != 0 || y != 0)
cout << x << " " << y << '\n';
}
return 0;
}
if (a % 2 == 0 && b % 2 == 0){
int x = 0, y = 0;
for (int it = 0; it < a / 2; it++){
x++;
cout << x << " " << y << '\n';
}
for (int it = 0; it < b / 2; it++){
y++;
cout << x << " " << y << '\n';
}
for (int it = 0; it < c / 2; it++){
x++; y++;
cout << x << " " << y << '\n';
}
for (int it = 0; it < d / 2; it++){
x--; y++;
cout << x << " " << y << '\n';
}
x--;
cout << x << " " << y << '\n';
for (int it = 0; it < d / 2; it++){
x++; y--;
cout << x << " " << y << '\n';
}
for (int it = 0; it < c / 2; it++){
x--; y--;
cout << x << " " << y << '\n';
}
for (int it = 0; it < b / 2; it++){
y--;
if (x != 0 || y != 0)
cout << x << " " << y << '\n';
}
for (int it = 1; it < a / 2; it++){
x--;
if (x != 0 || y != 0)
cout << x << " " << y << '\n';
}
return 0;
}
return 0;
}
# |
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 |
Incorrect |
5 ms |
384 KB |
duplicate vertices exist |
4 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
5 ms |
384 KB |
Output is correct |
2 |
Correct |
4 ms |
384 KB |
Output is correct |
3 |
Correct |
5 ms |
384 KB |
Output is correct |
4 |
Correct |
4 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 |
4 ms |
384 KB |
Output is correct |
2 |
Correct |
5 ms |
384 KB |
Output is correct |
3 |
Incorrect |
5 ms |
384 KB |
duplicate vertices exist |
4 |
Halted |
0 ms |
0 KB |
- |
# |
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 |
Incorrect |
5 ms |
384 KB |
duplicate vertices exist |
4 |
Halted |
0 ms |
0 KB |
- |
# |
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 |
Incorrect |
5 ms |
384 KB |
duplicate vertices exist |
4 |
Halted |
0 ms |
0 KB |
- |