답안 #1113409

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1113409 2024-11-16T14:31:42 Z Nonoze Make them Meet (EGOI24_makethemmeet) C++17
0 / 100
1 ms 336 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;
}


void print(vector<int>& a) {
	for (auto &u: a) cout << u << ' ';
	cout << endl;
}


int n, m;
vector<int> a;


void solve() {
	cin >> n >> m; a.clear(), a.resize(n, 1);
	cout << (n-1)*2 << endl;
	for (int x=0; x<2; x++) for (int i=1; i<n; i++) {
		a[0]=0, a[i]=0;
		print(a);
		a[0]=1, a[i]=1;
	}
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 336 KB Output is correct
2 Correct 1 ms 336 KB Output is correct
3 Incorrect 1 ms 336 KB If people start at 0 and 2, then they can avoid each other
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 336 KB Output is correct
2 Correct 1 ms 336 KB Output is correct
3 Correct 1 ms 336 KB Output is correct
4 Incorrect 1 ms 336 KB If people start at 0 and 2, then they can avoid each other
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 336 KB Output is correct
2 Incorrect 1 ms 336 KB If people start at 0 and 2, then they can avoid each other
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 336 KB Output is correct
2 Correct 1 ms 336 KB Output is correct
3 Incorrect 1 ms 336 KB If people start at 0 and 2, then they can avoid each other
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 336 KB Output is correct
2 Correct 1 ms 336 KB Output is correct
3 Incorrect 1 ms 336 KB If people start at 0 and 2, then they can avoid each other
4 Halted 0 ms 0 KB -