# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
674412 | QwertyPi | Subway (info1cup19_subway) | C++14 | 60 ms | 1368 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
int main(){
int k; cin >> k;
int ans = 0;
vector<pair<int, int>> vp = {{0, -1}};
while(ans + vp.size() <= k){
ans += vp.size();
vp.push_back({vp.size(), vp.size() - 1});
}
if(ans != k) vp.push_back({vp.size(), k - ans - 1});
cout << vp.size() << endl;
for(auto i : vp){
cout << i.first << ' ' << i.second << endl;
}
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |