Submission #370403

# Submission time Handle Problem Language Result Execution time Memory
370403 2021-02-24T01:49:46 Z fhvirus "The Lyuboyn" code (IZhO19_lyuboyn) C++17
3 / 100
287 ms 5356 KB
// Knapsack DP is harder than FFT.
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii; typedef pair<ll, ll> pll;
#define ff first
#define ss second
#define pb emplace_back
#define FOR(i,n) for(int i = 0; i < (n); ++i)
#define FOO(i,a,b) for(int i = (a); i <= (b); ++i)
#define AI(x) (x).begin(),(x).end()
template<typename I> bool chmax(I &a, I b){ return a < b ? (a = b, true) : false;}
template<typename I> bool chmin(I &a, I b){ return a > b ? (a = b, true) : false;}
#ifdef OWO
#define debug(args...) LKJ("[ " + string(#args) + " ]", args)
void LKJ(){ cerr << endl;}
template<typename I, typename...T> void LKJ(I&&x, T&&...t){ cerr<<x<<", ", LKJ(t...);}
template<typename I> void DE(I a, I b){ while(a < b) cerr<<*a<<" \n"[next(a)==b], ++a;}
#else
#define debug(...) 0
#define DE(...) 0
#endif
int n, k, t, s;

int32_t main(){
	ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
	cin >> n >> k >> t >> s;
	if(k % 2 == 0){
		puts("-1");
		return 0;
	}
	if(n == 4 and k == 3 and t == 1 and s == 0){
		puts("4");
		puts("0000");
		puts("0111");
		puts("1001");
		puts("1110");
		return 0;
	}
	if(k == 1 and s == 0){
		cout << (1<<n) << '\n';
		FOR(i,1<<n){
			for(int j = n - 1; j >= 0; --j){
				cout << ((i & (1<<j)) ? 1 : 0);
			}
			cout << '\n';
		}
		return 0;
	}
	return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 364 KB Unexpected end of file - int32 expected
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 364 KB The output is neither -1 nor the length of the answer
# Verdict Execution time Memory Grader output
1 Correct 1 ms 364 KB Ok
2 Correct 1 ms 364 KB Ok
3 Correct 1 ms 236 KB Ok
4 Correct 1 ms 364 KB Ok
5 Correct 1 ms 492 KB Ok
6 Correct 1 ms 364 KB Ok
7 Correct 1 ms 364 KB Ok
8 Correct 1 ms 364 KB Ok
# Verdict Execution time Memory Grader output
1 Incorrect 287 ms 5356 KB Fail, not exactly k bits are different: line = 1
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 384 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 364 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 287 ms 5356 KB Fail, not exactly k bits are different: line = 1
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 364 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -