# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
332260 | IgorI | Devil's Share (RMI19_devil) | C++17 | 41 ms | 1516 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
void solve()
{
int n = 10;
int k = 0;
cin >> k;
vector<int> d(n);
for (int i = 1; i < n; i++)
cin >> d[i];
if (d[1] == 0)
{
cout << string(d[2], '2') << "\n";
return;
}
string s(k - 1, '0');
for (int i = k - 2; i >= 0; i--)
{
if (d[2])
d[2]--, s[i] = '2';
else
d[1]--, s[i] = '1';
}
int c1 = d[1], c2 = d[2];
vector<int> h(c1, c2 / c1);
int add = c2 % c1;
//cout << c2 << " " << c1 << endl;
if (add > 0)
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |