# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
829659 |
2023-08-18T13:52:28 Z |
Blagoj |
Stray Cat (JOI20_stray) |
C++17 |
|
33 ms |
15056 KB |
#include <bits/stdc++.h>
#include "Anthony.h"
namespace {
int FunctionExample(int i, int A) { return i % A; }
} // namespace
using namespace std;
vector<int> Mark(int N, int M, int A, int B, vector<int> U, vector<int> V) {
vector<int> X(M);
queue<pair<int, int>> q;
q.push({0, 0});
string s = "001011";
vector<pair<int, int>> g[N];
for (int i = 0; i < M; i++) {
g[U[i]].push_back({V[i], i});
g[V[i]].push_back({U[i], i});
}
bool visited[N + 2];
memset(visited, 0, sizeof(visited));
visited[0] = 1;
while (q.size()) {
int cur = q.front().first, clr = q.front().second;
q.pop();
for (auto [to, id] : g[cur]) {
if (visited[to]) continue;
visited[to] = 1;
q.push({to, (clr + 1) % 3});
// cout << id << " : " << clr << endl;
X[id] = clr;
}
}
// for (int i = 0; i < X.size(); i++) cout << U[i] << " " << V[i] << " : " << X[i] << endl;
return X;
}
#include <bits/stdc++.h>
#include "Catherine.h"
namespace {
int A, B;
} // namespace
using namespace std;
void Init(int A, int B) {
::A = A;
::B = B;
}
int Move(vector<int> y) {
set<int> options;
bool gr[4];
memset(gr, 0, sizeof(gr));
for (auto x : y) {
cout << x << " ";
gr[x] = 1;
options.insert(x);
}
cout << endl;
if (options.size() == 1) return *options.begin();
if (gr[0] && gr[2]) return 2;
if (gr[1] && gr[2]) return 1;
return 0;
}
Compilation message
Anthony.cpp:6:5: warning: 'int {anonymous}::FunctionExample(int, int)' defined but not used [-Wunused-function]
6 | int FunctionExample(int i, int A) { return i % A; }
| ^~~~~~~~~~~~~~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
33 ms |
15056 KB |
Your program terminated abnormally, or printed anything to standard output. |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
33 ms |
15056 KB |
Your program terminated abnormally, or printed anything to standard output. |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
25 ms |
12996 KB |
Your program terminated abnormally, or printed anything to standard output. |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
25 ms |
12996 KB |
Your program terminated abnormally, or printed anything to standard output. |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
636 KB |
Wrong Answer [2] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
8 ms |
2240 KB |
Wrong Answer [2] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
6 ms |
2172 KB |
Wrong Answer [2] |
2 |
Halted |
0 ms |
0 KB |
- |