# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
595216 | AGE | Sob (COCI19_sob) | C++14 | 5 ms | 340 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>
#define F first
#define S second
#define pb push_back
#define int long long
using namespace std;
const int N=1e5+10,M=2e3,mod=10;
int a[N];
int c[N][35],dp[N][35];
main()
{
int n,m;
cin>>n>>m;
int x=1;
while(x<n)
x=(x<<1);
x=(x>>1);
x--;
int xx=n-x-1;
for(int i=m;i<=m+xx-1;i++)
cout<<i-m<<" "<<i<<endl;
for(int i=x+1;i<n;i++)
cout<<i<<" "<<m+xx+(i-x-1)<<endl;
for(int i=m+n-1;i>=m+xx*2;i--)
cout<<n-xx-(m+n+1-i-1)<<" "<<i<<endl;
return 0;
}
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |