Submission #601450

#TimeUsernameProblemLanguageResultExecution timeMemory
601450czhang2718Sob (COCI19_sob)C++17
0 / 110
2 ms340 KiB
#include "bits/stdc++.h" using namespace std; int n, m; int main(){ cin.tie(0)->sync_with_stdio(0); cin >> n >> m; int j=n; int i=n-1; int k=0; while(i>=0){ while(i+(1<<k)<j) k++; for(int p=j; p<=i+(1<<k); p++){ cout << p-(1<<k) << " " << p << "\n"; } int d=i+(1<<k)-j+1; j+=d; i-=d; } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...