General
 
 
# Author Problem Lang Verdict Time Memory Sent Judged  
144585341 Practice:
Igorfardoc
1632B - 22 C++20 (GCC 11-64) Accepted 46 ms 0 KB 2022-01-30 20:18:43 2022-01-30 20:18:43
→ Source
#include<bits/stdc++.h>
using namespace std;
 
 
int main() {
    int t;
    cin >> t;
    while(t--) {
        int n;
        cin >> n;
        int k = 0;
        while((1 << (k + 1)) <= n - 1) ++k; 
        for(int i = (1 << k) - 1; i >= 0; i--) {
            cout << i << ' ';
        }
        for(int i = (1 << k); i < n; i++) {
            cout << i << ' ';
        }
        cout << '\n';
    }
}
?
Time: ? ms, memory: ? KB
Verdict: ?
Input
?
Participant's output
?
Jury's answer
?
Checker comment
?
Diagnostics
?
Click to see test details