Submission #1078808

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
10788082024-08-28 06:24:09raphaelpBroken Device (JOI17_broken_device)C++14
Compilation error
0 ms0 KiB
#include "Annalib.h"
#include <bits/stdc++.h>
using namespace std;
void Anna(long long N, long long X, long long K, long long P[])
{
map<vector<int>, vector<int>> M;
M[{1, 1}] = {1, 1, 1};
M[{1}] = {1, 1, 0};
M[{1, 0}] = {1, 0, 1};
M[{0}] = {1, 0, 0};
M[{0, 1}] = {0, 1, 1};
M[{0, 0}] = {0, 1, 0};
vector<int> P2(N);
for (int i = 0; i < K; i++)
P2[P[i]] = 1;
vector<int> ans(N);
int buff = 0;
vector<int> bits;
while (X)
{
bits.push_back(X % 2);
X /= 2;
}
reverse(bits.begin(), bits.end());
for (int i = 0; i < 150; i += 3)
{
if (buff == bits.size())
break;
vector<int> temp;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

Anna.cpp: In function 'void Anna(long long int, long long int, long long int, long long int*)':
Anna.cpp:28:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   28 |         if (buff == bits.size())
      |             ~~~~~^~~~~~~~~~~~~~
Anna.cpp:40:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   40 |             if (buff < bits.size() - 1 && bits[buff] == 0)
      |                 ~~~~~^~~~~~~~~~~~~~~~~
Anna.cpp:63:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   63 |             if (buff < bits.size() - 1)
      |                 ~~~~~^~~~~~~~~~~~~~~~~
/usr/bin/ld: /tmp/ccJHim2d.o: in function `main':
grader_anna.c:(.text.startup+0x10b): undefined reference to `Anna(int, long long, int, int*)'
collect2: error: ld returned 1 exit status

Bruno.cpp: In function 'long long int Bruno(int, int*)':
Bruno.cpp:22:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   22 |         for (int j = 0; j < temp.size(); j++)
      |                         ~~^~~~~~~~~~~~~