제출 #524916

#제출 시각아이디문제언어결과실행 시간메모리
524916lucriSubway (info1cup19_subway)C++17
100 / 100
10 ms972 KiB
#include <iostream> using namespace std; int k,n,link[6000010]; int main() { link[0]=-1; cin>>k; n=1; for(int i=1;i<=k;++i) { ++n; k-=i; link[i]=i-1; } if(k) link[n++]=k-1; cout<<n<<'\n'; for(int i=0;i<n;++i) cout<<i<<' '<<link[i]<<'\n'; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...