Submission #345325

# Submission time Handle Problem Language Result Execution time Memory
345325 2021-01-07T07:25:31 Z l3nl3 Marriage questions (IZhO14_marriage) C++14
8 / 100
23 ms 748 KB
#include <bits/stdc++.h>
//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>  

#define exit exit(false)

//#define here() cerr << "herewego\n";
#define show(x) cerr << #x << ": " << x << '\n';

#define int long long
//#define double long double

#define all (a) a.begin(), a.end()
#define whole (a, p, q) a+p, a+p+q

#define ioio() ios_base::sync_with_stdio (0); cin.tie (0); cout.tie (0);

using namespace std;

//using namespace __gnu_pbds;   
//typedef tree <int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;  

int n, m, k;

signed main () { ioio();
	srand(time(NULL));
	cin >> n >> m >> k;
	int K = k;
	while (K--) {
		int a, b;
		cin >> a >> b;
	}
	if (k == 1) {
		cout << 1;
		exit;
	}
	if (k == 2) {
		cout << 1;
		exit;
	}
	if (k == 3) {
		cout << n - (rand() % 3);
		exit;
	}
	if (k == 4) {
		cout << rand() % 3 + 1;
		exit;
	}
	if (k == 7 && m == 3 && n == 5) {
		cout << 4;
		exit;
	}
	cout << k-2;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 392 KB Output is correct
2 Incorrect 1 ms 496 KB Output isn't correct
3 Incorrect 1 ms 364 KB Output isn't correct
4 Incorrect 1 ms 364 KB Output isn't correct
5 Incorrect 1 ms 364 KB Output isn't correct
6 Incorrect 1 ms 364 KB Output isn't correct
7 Incorrect 1 ms 364 KB Output isn't correct
8 Correct 1 ms 364 KB Output is correct
9 Incorrect 1 ms 364 KB Output isn't correct
10 Incorrect 1 ms 364 KB Output isn't correct
11 Correct 1 ms 364 KB Output is correct
12 Incorrect 1 ms 364 KB Output isn't correct
13 Incorrect 1 ms 364 KB Output isn't correct
14 Incorrect 1 ms 364 KB Output isn't correct
15 Incorrect 1 ms 384 KB Output isn't correct
16 Incorrect 1 ms 364 KB Output isn't correct
17 Correct 1 ms 364 KB Output is correct
18 Incorrect 1 ms 364 KB Output isn't correct
19 Incorrect 1 ms 384 KB Output isn't correct
20 Incorrect 1 ms 364 KB Output isn't correct
21 Incorrect 1 ms 364 KB Output isn't correct
22 Incorrect 1 ms 364 KB Output isn't correct
23 Incorrect 1 ms 364 KB Output isn't correct
24 Incorrect 1 ms 364 KB Output isn't correct
25 Incorrect 3 ms 364 KB Output isn't correct
26 Incorrect 1 ms 364 KB Output isn't correct
27 Incorrect 1 ms 364 KB Output isn't correct
28 Incorrect 1 ms 364 KB Output isn't correct
29 Incorrect 3 ms 364 KB Output isn't correct
30 Incorrect 2 ms 364 KB Output isn't correct
31 Incorrect 8 ms 620 KB Output isn't correct
32 Incorrect 1 ms 364 KB Output isn't correct
33 Incorrect 1 ms 364 KB Output isn't correct
34 Incorrect 1 ms 364 KB Output isn't correct
35 Incorrect 15 ms 744 KB Output isn't correct
36 Incorrect 16 ms 748 KB Output isn't correct
37 Incorrect 8 ms 672 KB Output isn't correct
38 Incorrect 20 ms 748 KB Output isn't correct
39 Incorrect 1 ms 384 KB Output isn't correct
40 Incorrect 3 ms 364 KB Output isn't correct
41 Incorrect 4 ms 492 KB Output isn't correct
42 Incorrect 7 ms 632 KB Output isn't correct
43 Incorrect 8 ms 648 KB Output isn't correct
44 Incorrect 15 ms 748 KB Output isn't correct
45 Incorrect 6 ms 620 KB Output isn't correct
46 Incorrect 21 ms 748 KB Output isn't correct
47 Incorrect 17 ms 748 KB Output isn't correct
48 Incorrect 19 ms 748 KB Output isn't correct
49 Incorrect 23 ms 748 KB Output isn't correct
50 Incorrect 2 ms 364 KB Output isn't correct