#include<bits/stdc++.h>
#include "Alicelib.h"
using namespace std;
const int MAXN = 1510;
int in[MAXN];
void Alice(int n, int m, int a[], int b[])
{
int nodes = n;
vector<pair<int, int> > ans;
for(int i = 0; i < m; i++)
in[a[i]]++, in[b[i]]++;
for(int i = 0; i < n; i++)
for(int j = in[i]; j < i + 40; j++)
ans.push_back(make_pair(i, nodes++));
InitG(nodes, (int) ans.size() + m);
for(int i = 0; i < m; i++) MakeG(i, a[i], b[i]);
for(int i = m; i < m + (int) ans.size(); i++) MakeG(i, ans[i - m].first, ans[i - m].second);
}
#include<bits/stdc++.h>
#include "Boblib.h"
using namespace std;
const int MAXN = 1510;
int in[MAXN], p[MAXN];
void Bob(int v, int u, int c[], int d[])
{
for(int i = 0; i < u; i++)
in[c[i]]++, in[d[i]]++;
for(int i = 0; i < v; i++)
{
if(in[i] < 40) p[i] = MAXN * MAXN;
else p[i] = in[i] - 40;
}
vector<pair<int, int> > ans;
int n = 0;
for(int i = 0; i < u; i++)
{
int a = p[c[i]];
int b = p[d[i]];
if(a < MAXN * MAXN) n = max(n, a);
if(b < MAXN * MAXN) n = max(n, b);
if(a == MAXN * MAXN || b == MAXN * MAXN) continue;
ans.push_back(make_pair(a, b));
}
InitMap(n + 1, (int) ans.size());
for(int i = 0; i < (int) ans.size(); i++) MakeMap(ans[i].first, ans[i].second);
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
6 ms |
6912 KB |
Output is correct |
2 |
Correct |
7 ms |
6912 KB |
Output is correct |
3 |
Correct |
6 ms |
6912 KB |
Output is correct |
4 |
Correct |
7 ms |
6912 KB |
Output is correct |
5 |
Correct |
6 ms |
6912 KB |
Output is correct |
6 |
Correct |
6 ms |
6912 KB |
Output is correct |
7 |
Correct |
7 ms |
6912 KB |
Output is correct |
8 |
Correct |
6 ms |
6912 KB |
Output is correct |
9 |
Correct |
7 ms |
6912 KB |
Output is correct |
10 |
Correct |
7 ms |
6912 KB |
Output is correct |
11 |
Correct |
6 ms |
6912 KB |
Output is correct |
12 |
Correct |
7 ms |
6912 KB |
Output is correct |
13 |
Correct |
7 ms |
6912 KB |
Output is correct |
14 |
Correct |
7 ms |
6912 KB |
Output is correct |
15 |
Correct |
7 ms |
6912 KB |
Output is correct |
16 |
Correct |
7 ms |
6912 KB |
Output is correct |
17 |
Correct |
6 ms |
6912 KB |
Output is correct |
18 |
Correct |
7 ms |
6912 KB |
Output is correct |
19 |
Correct |
6 ms |
6912 KB |
Output is correct |
20 |
Correct |
7 ms |
6912 KB |
Output is correct |
21 |
Correct |
6 ms |
6912 KB |
Output is correct |
22 |
Correct |
6 ms |
6912 KB |
Output is correct |
23 |
Correct |
7 ms |
6912 KB |
Output is correct |
24 |
Correct |
7 ms |
6912 KB |
Output is correct |
25 |
Correct |
6 ms |
6912 KB |
Output is correct |
26 |
Correct |
7 ms |
6912 KB |
Output is correct |
27 |
Correct |
6 ms |
6912 KB |
Output is correct |
28 |
Correct |
6 ms |
6912 KB |
Output is correct |
29 |
Correct |
6 ms |
6912 KB |
Output is correct |
30 |
Correct |
6 ms |
6912 KB |
Output is correct |
31 |
Correct |
6 ms |
6912 KB |
Output is correct |
32 |
Correct |
6 ms |
6912 KB |
Output is correct |
33 |
Correct |
7 ms |
6912 KB |
Output is correct |
34 |
Correct |
6 ms |
6912 KB |
Output is correct |
35 |
Correct |
7 ms |
6912 KB |
Output is correct |
36 |
Correct |
7 ms |
6912 KB |
Output is correct |
37 |
Correct |
7 ms |
6912 KB |
Output is correct |
38 |
Correct |
7 ms |
6912 KB |
Output is correct |
39 |
Correct |
7 ms |
6912 KB |
Output is correct |
40 |
Correct |
6 ms |
6976 KB |
Output is correct |
41 |
Correct |
7 ms |
6912 KB |
Output is correct |
42 |
Correct |
6 ms |
6912 KB |
Output is correct |
43 |
Correct |
6 ms |
6912 KB |
Output is correct |
44 |
Correct |
6 ms |
6912 KB |
Output is correct |
45 |
Correct |
6 ms |
6912 KB |
Output is correct |
46 |
Correct |
6 ms |
6912 KB |
Output is correct |
47 |
Correct |
6 ms |
6912 KB |
Output is correct |
48 |
Correct |
6 ms |
6912 KB |
Output is correct |
49 |
Correct |
6 ms |
6912 KB |
Output is correct |
50 |
Correct |
6 ms |
6912 KB |
Output is correct |
51 |
Correct |
6 ms |
6912 KB |
Output is correct |
52 |
Correct |
6 ms |
6912 KB |
Output is correct |
53 |
Correct |
6 ms |
6912 KB |
Output is correct |
54 |
Correct |
6 ms |
6912 KB |
Output is correct |
55 |
Correct |
6 ms |
6912 KB |
Output is correct |
56 |
Correct |
7 ms |
6912 KB |
Output is correct |
57 |
Correct |
6 ms |
6912 KB |
Output is correct |
58 |
Correct |
6 ms |
6912 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
6 ms |
6912 KB |
Output is correct |
2 |
Correct |
7 ms |
6912 KB |
Output is correct |
3 |
Correct |
6 ms |
6912 KB |
Output is correct |
4 |
Correct |
7 ms |
6912 KB |
Output is correct |
5 |
Correct |
6 ms |
6912 KB |
Output is correct |
6 |
Correct |
6 ms |
6912 KB |
Output is correct |
7 |
Correct |
7 ms |
6912 KB |
Output is correct |
8 |
Correct |
6 ms |
6912 KB |
Output is correct |
9 |
Correct |
7 ms |
6912 KB |
Output is correct |
10 |
Correct |
7 ms |
6912 KB |
Output is correct |
11 |
Correct |
6 ms |
6912 KB |
Output is correct |
12 |
Correct |
7 ms |
6912 KB |
Output is correct |
13 |
Correct |
7 ms |
6912 KB |
Output is correct |
14 |
Correct |
7 ms |
6912 KB |
Output is correct |
15 |
Correct |
7 ms |
6912 KB |
Output is correct |
16 |
Correct |
7 ms |
6912 KB |
Output is correct |
17 |
Correct |
6 ms |
6912 KB |
Output is correct |
18 |
Correct |
7 ms |
6912 KB |
Output is correct |
19 |
Correct |
6 ms |
6912 KB |
Output is correct |
20 |
Correct |
7 ms |
6912 KB |
Output is correct |
21 |
Correct |
6 ms |
6912 KB |
Output is correct |
22 |
Correct |
6 ms |
6912 KB |
Output is correct |
23 |
Correct |
7 ms |
6912 KB |
Output is correct |
24 |
Correct |
7 ms |
6912 KB |
Output is correct |
25 |
Correct |
6 ms |
6912 KB |
Output is correct |
26 |
Correct |
7 ms |
6912 KB |
Output is correct |
27 |
Correct |
6 ms |
6912 KB |
Output is correct |
28 |
Correct |
6 ms |
6912 KB |
Output is correct |
29 |
Correct |
6 ms |
6912 KB |
Output is correct |
30 |
Correct |
6 ms |
6912 KB |
Output is correct |
31 |
Correct |
6 ms |
6912 KB |
Output is correct |
32 |
Correct |
6 ms |
6912 KB |
Output is correct |
33 |
Correct |
7 ms |
6912 KB |
Output is correct |
34 |
Correct |
6 ms |
6912 KB |
Output is correct |
35 |
Correct |
7 ms |
6912 KB |
Output is correct |
36 |
Correct |
7 ms |
6912 KB |
Output is correct |
37 |
Correct |
7 ms |
6912 KB |
Output is correct |
38 |
Correct |
7 ms |
6912 KB |
Output is correct |
39 |
Correct |
7 ms |
6912 KB |
Output is correct |
40 |
Correct |
6 ms |
6976 KB |
Output is correct |
41 |
Correct |
7 ms |
6912 KB |
Output is correct |
42 |
Correct |
6 ms |
6912 KB |
Output is correct |
43 |
Correct |
6 ms |
6912 KB |
Output is correct |
44 |
Correct |
6 ms |
6912 KB |
Output is correct |
45 |
Correct |
6 ms |
6912 KB |
Output is correct |
46 |
Correct |
6 ms |
6912 KB |
Output is correct |
47 |
Correct |
6 ms |
6912 KB |
Output is correct |
48 |
Correct |
6 ms |
6912 KB |
Output is correct |
49 |
Correct |
6 ms |
6912 KB |
Output is correct |
50 |
Correct |
6 ms |
6912 KB |
Output is correct |
51 |
Correct |
6 ms |
6912 KB |
Output is correct |
52 |
Correct |
6 ms |
6912 KB |
Output is correct |
53 |
Correct |
6 ms |
6912 KB |
Output is correct |
54 |
Correct |
6 ms |
6912 KB |
Output is correct |
55 |
Correct |
6 ms |
6912 KB |
Output is correct |
56 |
Correct |
7 ms |
6912 KB |
Output is correct |
57 |
Correct |
6 ms |
6912 KB |
Output is correct |
58 |
Correct |
6 ms |
6912 KB |
Output is correct |
59 |
Correct |
7 ms |
6912 KB |
Output is correct |
60 |
Correct |
7 ms |
6912 KB |
Output is correct |
61 |
Incorrect |
5 ms |
3456 KB |
Wrong Answer [1] |
62 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
494 ms |
7244 KB |
Wrong Answer [1] |
2 |
Halted |
0 ms |
0 KB |
- |