이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
using namespace std;
int main()
{
int a, b, c, d;
cin >> a >> b >> c >> d;
stack<pair<int,int> > st;
st.push({0, 0});
for(int i = 0; i < a / 2; i ++)
{
int x = st.top().first, y = st.top().second;
x++;
st.push({x, y});
}
for(int i = 0; i < d / 2; i ++)
{
int x = st.top().first, y = st.top().second;
x++, y--;
st.push({x, y});
}
for(int i = 0; i < b / 2; i ++)
{
int x = st.top().first, y = st.top().second;
y--;
st.push({x, y});
}
for(int i = 0; i < c / 2; i ++)
{
int x = st.top().first, y = st.top().second;
x--, y--;
st.push({x, y});
}
for(int i = 0; i < a / 2; i ++)
{
int x = st.top().first, y = st.top().second;
x--;
st.push({x, y});
}
for(int i = 0; i < d / 2; i ++)
{
int x = st.top().first, y = st.top().second;
x--, y++;
st.push({x, y});
}
for(int i = 0; i < b / 2; i ++)
{
int x = st.top().first, y = st.top().second;
y++;
st.push({x, y});
}
for(int i = 0; i < c / 2; i ++)
{
int x = st.top().first, y = st.top().second;
x++, y++;
st.push({x, y});
}
while(st.size() > 1)
{
cout << st.top().first << ' ' << st.top().second << endl;
st.pop();
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |