Submission #595166

#TimeUsernameProblemLanguageResultExecution timeMemory
595166AGESob (COCI19_sob)C++14
0 / 110
7 ms340 KiB
#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 index=-1; for(int i=m+n-1;i>=m;i--){ int y=n-1; int x=(i&y); if(x==y){ index=i; break; } } int indexx=index+1; int i=n-1; while(i>-1){ cout<<i<<" "<<index<<endl; i--; index--; if(index==m-1) index=m+n-1; } if(i!=0) cout<<i<<" "<<indexx<<endl; return 0; }

Compilation message (stderr)

sob.cpp:11:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   11 | main()
      | ^~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...