#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 + 10; 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] < 10) p[i] = MAXN * MAXN;
else p[i] = in[i] - 10;
}
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 || b == MAXN * MAXN) continue;
n = max(n, max(a, b));
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 |
6 ms |
6912 KB |
Output is correct |
3 |
Correct |
6 ms |
6912 KB |
Output is correct |
4 |
Incorrect |
7 ms |
6912 KB |
Wrong Answer [10] |
5 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
6 ms |
6912 KB |
Output is correct |
2 |
Correct |
6 ms |
6912 KB |
Output is correct |
3 |
Correct |
6 ms |
6912 KB |
Output is correct |
4 |
Incorrect |
7 ms |
6912 KB |
Wrong Answer [10] |
5 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
689 ms |
22800 KB |
Wrong Answer [12] |
2 |
Halted |
0 ms |
0 KB |
- |