Submission #1044067

#TimeUsernameProblemLanguageResultExecution timeMemory
1044067vjudge1Pick (COI18_pick)C++17
10 / 100
1 ms348 KiB
#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 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...