Submission #159085

# Submission time Handle Problem Language Result Execution time Memory
159085 2019-10-20T16:10:02 Z mrboorger "The Lyuboyn" code (IZhO19_lyuboyn) C++14
0 / 100
2 ms 504 KB
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
//#include "interactive.h"

#define pb push_back
#define F first
#define S second
#define ll long long
#define ld long double
#define sqr(x) (x) * (x)
//#define all(a) a.begin(), a.end()

using namespace std;

const int maxn = (1 << 18) + 23;
bool used[maxn];

int main()
{
#ifdef LOCAL
//    freopen("input.txt", "r", stdin);
//    freopen("output.txt", "w", stdout);
#endif // LOCAL
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    int n = 4;
    int k = 1;
    cout << "0 1 3 7 15 11 9 13 5 4 6 14 10 2 0 8 12 17";
    return 0;
    vector <int> a;
    for(int i = 0; i < (1 << n); ++i)
        a.pb(i);
    vector <int> b;
    b.pb(0);
    cerr << b.back() << ' ';
    while(int(b.size()) < (1 << n))
    {
        for(int i = 0; i < int(a.size()); ++i)
        {
            if (used[i]) continue;
            if (__builtin_popcount(a[i] ^ b.back()) == k)
            {
                b.pb(a[i]);
                cerr << b.back() << ' ';
                used[i] = true;
            }
        }
    }
    cerr << b.size() << endl;
    return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 504 KB Expected EOLN
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 376 KB Expected EOLN
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 376 KB Expected EOLN
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 504 KB Expected EOLN
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 376 KB Expected EOLN
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 376 KB Expected EOLN
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 504 KB Expected EOLN
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 252 KB Expected EOLN
2 Halted 0 ms 0 KB -