#include "Alicelib.h"
#include <bits/stdc++.h>
#include <cassert>
#include <cstdio>
using namespace std;
void Alice( int N, int M, int A[], int B[] ){
vector<array<int, 2>> v;
for(int i = 0; i < M; i++)
{
v.push_back({A[i], B[i]});
}
for(int i = N; i < 2*N+1; i++)
{
for(int j = i+1; j < 2*N+1; j++)
{
v.push_back({i, j});
}
}
for(int i = 0; i < N; i++)
{
for(int j = N; j < N+i; j++)
{
v.push_back({i, j});
}
}
InitG(2*N+1, v.size());
for(int i = 0; i < v.size(); i++)
{
MakeG(i, v[i][0], v[i][1]);
}
}
#include "Boblib.h"
#include <bits/stdc++.h>
#include <cassert>
#include <cstdio>
using namespace std;
void Bob( int V, int U, int C[], int D[] ){
int N = (V-1)/2;
int deg[V], p[V];
memset(deg, 0, sizeof(deg));
memset(p, 0, sizeof(p));
for(int i = 0; i < U; i++)
{
deg[C[i]]++;
deg[D[i]]++;
}
vector<int> o;
for(int i = 0; i < V; i++)
{
if(deg[i] >= N)
{
o.push_back(i);
}
}
vector<array<int, 2>> v;
for(int i = 0; i < U; i++)
{
if(deg[C[i]] >= N || deg[D[i]] >= N)
{
p[D[i]]++, p[C[i]]++;
continue;
}
v.push_back({C[i], D[i]});
}
InitMap(N, v.size());
for(auto [a, b] : v) MakeMap(p[a], p[b]);
}
Compilation message
Alice.cpp: In function 'void Alice(int, int, int*, int*)':
Alice.cpp:29:19: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::array<int, 2> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
29 | for(int i = 0; i < v.size(); i++)
| ~~^~~~~~~~~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
3 ms |
15616 KB |
Wrong Answer [11] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
3 ms |
15616 KB |
Wrong Answer [11] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
273 ms |
28836 KB |
Wrong Answer [1] |
2 |
Halted |
0 ms |
0 KB |
- |