Submission #551676

#TimeUsernameProblemLanguageResultExecution timeMemory
551676cpp219Sob (COCI19_sob)C++17
110 / 110
76 ms7116 KiB
#include<bits/stdc++.h> #define ll long long #define ld long double #define fs first #define sc second #define debug(y) cout<<y,exit(0) using namespace std; typedef pair<ll,ll> LL; const ll N = 500 + 9; const ll inf = 1e18 + 7; ll n,m; int main(){ ios_base::sync_with_stdio(NULL); cin.tie(0); cout.tie(0); #define task "tst" if (fopen(task".inp","r")){ freopen(task".inp","r",stdin); //freopen(task".out","w",stdout); } cin>>n>>m; for (ll i = n - 1;i >= 0;){ for (ll j = m;j <= n + m;j++){ if ((i & j) == i){ ll first = j + 1; while (j >= m){ cout<<i<<" "<<j<<"\n"; i--; j--; } m = first; break; } } } } /// be confident

Compilation message (stderr)

sob.cpp: In function 'int main()':
sob.cpp:18:16: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   18 |         freopen(task".inp","r",stdin);
      |         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...