#include <bits/stdc++.h>
#include "Alicelib.h"
using namespace std;
static bool exist1[1010];
void Alice (int N, int M, int A[], int B[]) {
vector<pair<int, int>> edges;
for (int i = 0; i < M; i++) {
if (A[i] > B[i]) {
swap(A[i], B[i]);
}
exist1[A[i]] |= (B[i] == A[i] + 1);
edges.push_back({A[i], B[i]});
}
for (int i = 0; i < N - 1; i++) {
if (!exist1[i]) {
edges.push_back({i, i + 1});
edges.push_back({i, N});
}
}
edges.push_back({N - 1, N});
InitG(N + 1, edges.size());
for (int i = 0; i < edges.size(); i++) {
MakeG(i, edges[i].first, edges[i].second);
}
}
#include <bits/stdc++.h>
#include "Boblib.h"
using namespace std;
static vector<int> adj[1010];
static int indeg[1010];
static int ind[1010];
void Bob (int N, int M, int C[], int D[]) {
}
Compilation message
Alice.cpp: In function 'void Alice(int, int, int*, int*)':
Alice.cpp:28:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i < edges.size(); i++) {
~~^~~~~~~~~~~~~~
Bob.cpp:8:12: warning: 'ind' defined but not used [-Wunused-variable]
static int ind[1010];
^~~
Bob.cpp:7:12: warning: 'indeg' defined but not used [-Wunused-variable]
static int indeg[1010];
^~~~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
15 ms |
6640 KB |
Wrong Answer [17] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
15 ms |
6640 KB |
Wrong Answer [17] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
626 ms |
30408 KB |
Wrong Answer [17] |
2 |
Halted |
0 ms |
0 KB |
- |