답안 #159086

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
159086 2019-10-20T16:32:03 Z mrboorger "The Lyuboyn" code (IZhO19_lyuboyn) C++14
0 / 100
2 ms 376 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 = 5;
    int k = 1;
    cout << "16\n0000\n0001\n0011\n0010\n0110\n0100\n0101\n0111\n1111\n1110\n1100\n1101\n1001\n1011\n1010\n1000";
    return 0;
    vector <int> b;
    b.pb(0);
    used[0] = true;
    for(int j = n - 1; j >= 0; --j)
        cerr << ((0 & (1 << j)) > 0) << ' ';
    cout << '\n';
    while(int(b.size()) < (1 << n))
    {
        for(int i = 0; i < int(1 << n); ++i)
        {
            if (used[i]) continue;
            if (__builtin_popcount(i ^ b.back()) == k)
            {
                b.pb(i);
                for(int j = n - 1; j >= 0; --j)
                    cerr << ((i & (1 << j)) > 0) << ' ';
                cout << '\n';
                used[i] = true;
            }
        }
    }
//    cout << b.size() << endl;
    return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 376 KB The output is neither -1 nor the length of the answer
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 376 KB Fail, not exactly k bits are different: line = 0
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 376 KB The output is neither -1 nor the length of the answer
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 376 KB The output is neither -1 nor the length of the answer
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 376 KB The output is neither -1 nor the length of the answer
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 376 KB The output is neither -1 nor the length of the answer
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 376 KB The output is neither -1 nor the length of the answer
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 376 KB The output is neither -1 nor the length of the answer
2 Halted 0 ms 0 KB -