Submission #332260

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
3322602020-12-01 19:50:37IgorIDevil's Share (RMI19_devil)C++17
0 / 100
41 ms1516 KiB
#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)
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

devil.cpp: In function 'void solve()':
devil.cpp:34:31: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   34 |             if (h.size() / st >= add)
      |                 ~~~~~~~~~~~~~~^~~~~~
devil.cpp:36:35: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   36 |                 for (int i = 0; i < h.size(); i += st)
      |                                 ~~^~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...