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 <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 time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |