Submission #764992

#TimeUsernameProblemLanguageResultExecution timeMemory
7649921075508020060209tcSob (COCI19_sob)C++14
39 / 110
1078 ms1676 KiB
#include<bits/stdc++.h> using namespace std; #define int long long #define X first #define Y second int n;int m; int vis[1000006]; signed main(){ cin.tie(0); ios_base::sync_with_stdio(0); vector<pair<int,int>>ans; cin>>n>>m; for(int i=n-1;i>=0;i--){ for(int j=0;j<=n-1;j++){ if(vis[j]){continue;} if( ((i&(j+m))==i) ){ ans.push_back({i,j+m}); vis[j]=1; break; } } } for(int i=0;i<ans.size();i++){ cout<<ans[i].first<<" "<<ans[i].second<<endl; } }

Compilation message (stderr)

sob.cpp: In function 'int main()':
sob.cpp:24:14: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<std::pair<long long int, long long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   24 | for(int i=0;i<ans.size();i++){
      |             ~^~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...