Submission #256543

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
2565432020-08-02 20:16:53Harry464Cave (IOI13_cave)C++14
Compilation error
0 ms0 KiB
#include <iostream>
#include <algorithm>
#include <cmath>
#include <vector>
#include <cstring>
#include "cave.h"
typedef int ll;
using namespace std;
void exploreCave(int n)
{
ll sw[n];
ll odg[n];
for (int i = 0; i < n; i++)
sw[i] = 0, odg[i] = -1;
for (int j = 0; j < n; j++){
for (int i = 0; i < n; i++)
t[i] = sw[i];
vector <ll> free;
for (int i = 0; i < n; i++)
if (odg[i] == -1)
free.push_back(i), sw[i] = 1;
ll ask = tryCombination(t);
ll trig;
if (ask == j)
trig = 0;
else
trig = 1;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

cave.cpp: In function 'void exploreCave(int)':
cave.cpp:20:10: error: 't' was not declared in this scope
          t[i] = sw[i];
          ^
cave.cpp:25:33: error: 't' was not declared in this scope
         ll ask = tryCombination(t);
                                 ^
cave.cpp:38:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for (int i = mid + 1; i < free.size(); i++)
                                   ~~^~~~~~~~~~~~~