답안 #1098090

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1098090 2024-10-09T04:18:33 Z Trisanu_Das Make them Meet (EGOI24_makethemmeet) C++17
10 / 100
2 ms 348 KB
#include <bits/stdc++.h>
using namespace std;
 
int main() {
    cin.tie(0)->sync_with_stdio(0);
    int n, m; cin >> n >> m;
	vector<int> adj[n];
	while(m--){
		int u, v; cin >> u >> v;
		adj[u].push_back(v);
		adj[v].push_back(u);
	}
	cout << 2 * n  - 1 << '\n';
	for(int i = 0; i < n - 1; i++){
		for(int j = 0; j < n; j++){
			if(j == i + 1) cout << 0 << ' ';
			else cout << j << ' ';
		}
		cout << '\n';
		for(int j = 0; j < n; j++){
			if(j == i + 1) cout << 0 << ' ';
			else cout << j << ' ';
		}
		cout << '\n';
	}
	for(int i = 0; i < n; i++) cout << 0 << ' ';
	cout << '\n';
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 1 ms 344 KB Output is correct
5 Correct 2 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Incorrect 0 ms 348 KB If people start at 1 and 2, then they can avoid each other
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Incorrect 0 ms 348 KB If people start at 1 and 2, then they can avoid each other
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 1 ms 344 KB Output is correct
5 Correct 2 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Incorrect 0 ms 348 KB If people start at 1 and 2, then they can avoid each other
8 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 1 ms 344 KB Output is correct
5 Correct 2 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Incorrect 0 ms 348 KB If people start at 1 and 2, then they can avoid each other
8 Halted 0 ms 0 KB -