Submission #769057

# Submission time Handle Problem Language Result Execution time Memory
769057 2023-06-29T06:25:13 Z RushB Newspapers (CEOI21_newspapers) C++17
8 / 100
1 ms 340 KB
#include "bits/stdc++.h"
#define int long long
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
using namespace std;
const long long INF = 1ll << 60;
const int N = 1000 + 5;

signed main() {
	ios::sync_with_stdio(0), cin.tie(0);
	int n, m;
	cin >> n >> m;
	if (m >= n) {
		cout << "NO\n";
		return 0;
	}
	FOR(i, 1, n) {
		int u, v; cin >> u >> v;	
	}
	cout << "YES\n";
	if (n <= 2) {
		cout << n << '\n';
		FOR(i, 0, n) cout << 1 << ' ';
		return 0;
	}
	cout << 2 * n - 4 << '\n';
	FOR(i, 1, n - 1) cout << i + 1 << ' ';
	FOR(i, 1, n - 1) cout << n - i << ' ';
	cout << '\n';
	return 0;
}
//Reading this fills you with DETERMINATION
//20:06:46
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 316 KB Output is correct
3 Correct 0 ms 324 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Partially correct 0 ms 212 KB Failed to provide a successful strategy.
6 Partially correct 1 ms 320 KB Failed to provide a successful strategy.
7 Correct 1 ms 212 KB Output is correct
8 Partially correct 1 ms 212 KB Failed to provide a successful strategy.
9 Incorrect 1 ms 212 KB Output isn't correct
10 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 0 ms 320 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 1 ms 324 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 0 ms 212 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 0 ms 212 KB Output is correct
11 Correct 1 ms 212 KB Output is correct
12 Correct 1 ms 212 KB Output is correct
13 Correct 1 ms 212 KB Output is correct
14 Correct 1 ms 212 KB Output is correct
15 Correct 1 ms 340 KB Output is correct
16 Correct 1 ms 212 KB Output is correct
17 Correct 1 ms 324 KB Output is correct
18 Correct 1 ms 212 KB Output is correct
19 Correct 1 ms 212 KB Output is correct
20 Correct 1 ms 340 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 316 KB Output is correct
3 Correct 0 ms 324 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Partially correct 0 ms 212 KB Failed to provide a successful strategy.
6 Partially correct 1 ms 320 KB Failed to provide a successful strategy.
7 Correct 1 ms 212 KB Output is correct
8 Partially correct 1 ms 212 KB Failed to provide a successful strategy.
9 Incorrect 1 ms 212 KB Output isn't correct
10 Halted 0 ms 0 KB -