# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1229815 | nhnguyen14 | Sob (COCI19_sob) | C++20 | 0 ms | 324 KiB |
#include<bits/stdc++.h>
using namespace std;
typedef long long LL;
const int MAXLOG=20;
const int N=(int)1e6;
int n,m;
namespace subtask1{
bool check(){
return n+m<=1000;
}
bool f[N+2]={};
void main_code(){
for(int i=n-1;i>=0;--i){
for(int j=m+n-1;j>=m;--j){
if (f[j]==false && (j&i)==i){
cout<<i<<' '<<j<<'\n';
f[j]=true;
break;
}
}
}
return;
}
}
int main(){
ios::sync_with_stdio(false);
cin.tie(0) ; cout.tie(0);
#define task "main"
if (fopen(task".inp","r")){
freopen(task".inp","r",stdin);
// freopen(task".out","w",stdout);
}
cin>>n>>m;
if (subtask1::check()) return subtask1::main_code(),0;
assert(false);
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... |