Submission #1113419

# Submission time Handle Problem Language Result Execution time Memory
1113419 2024-11-16T14:39:11 Z Nonoze Make them Meet (EGOI24_makethemmeet) C++17
0 / 100
1494 ms 1048576 KB
#include <bits/stdc++.h>
using namespace std;

#define sz(x) (int)x.size()
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define cmin(a, b) a=min(a, b)
#define cmax(a, b) a=max(a, b)
#define fi first
#define se second
#define pb push_back
#define mp make_pair

#define int long long

void solve();

signed main() {
	ios::sync_with_stdio(0); cin.tie(0);
	solve();
	return 0;
}

vector<vector<int>> vec;


void print() {
	cout << sz(vec) << endl;
	for (auto &a: vec) {
		for (auto &u: a) cout << u << ' ';
		cout << endl;
	}
	cout << endl;
}

void add(vector<int> &a) { vec.pb(a); }


int n, m;
vector<int> a;


void solve() {
	cin >> n >> m; a.clear(), a.resize(n, 1);
	for (int i=1; i<n; i++) {
		a[i-1]=0, a[i]=0;
		add(a);
		a[i-1]=1, a[i]=1;
	}
	for (int i=n-1; i>0; i++) {
		a[i-1]=0, a[i]=0;
		add(a);
		a[i-1]=1, a[i]=1;
	}
	print();
}
# Verdict Execution time Memory Grader output
1 Runtime error 1494 ms 1048576 KB Execution killed with signal 9
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1283 ms 1048576 KB Execution killed with signal 9
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1206 ms 1048576 KB Execution killed with signal 9
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1494 ms 1048576 KB Execution killed with signal 9
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1494 ms 1048576 KB Execution killed with signal 9
2 Halted 0 ms 0 KB -