| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1333757 | QuocSensei | Data Transfer (IOI19_transfer) | C++20 | 1275 ms | 3256 KiB |
#include <bits/stdc++.h>
#define ll long long
#define el cout << endl
#define ii pair<int, int>
#define fi first
#define se second
using namespace std;
namespace SUBTASK_1
{
namespace personA
{
vector<int> get_attachment(vector<int> source)
{
int N = source.size();
vector<int> data;
for (int i = 0; i < N; i++)
{
data.push_back(source[i]);
data.push_back(source[i]);
}
return data;
}
}
namespace personB
{
vector<int> retrieve(vector<int> data)
{
vector<int> ans;
int N = data.size() / 3;
for (int i = 0; i < N; i++)
{
vector<int> v0 = {0, 0};
vector<int> v1 = {0, 1};
for (int x : {i, N + 2 * i, N + 2 * i + 1})
{
v0[0] += data[x] == 0;
v1[0] += data[x] == 1;
}
ans.push_back(max(v0, v1)[1]);
}
return ans;
}
}
}
vector<int> get_attachment(vector<int> source)
{
return SUBTASK_1::personA::get_attachment(source);
}
vector<int> retrieve(vector<int> data)
{
return SUBTASK_1::personB::retrieve(data);
}Compilation message (stderr)
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
