Submission #555285

#TimeUsernameProblemLanguageResultExecution timeMemory
555285uroskCave (IOI13_cave)C++14
Compilation error
0 ms0 KiB
#include "cave.h"
#include <bits/stdc++.h>
#define ld double
#define ll long long
#define ull unsigned long long
#define llinf 100000000000000000LL // 10^17
#define iinf 2000000000 // 2*10^9
#define pb push_back
#define popb pop_back
#define fi first
#define sc second
#define endl '\n'
#define pii pair<int,int>
#define pll pair<ll,ll>
#define pld pair<ld,ld>
#define sz(a) int(a.size())
#define all(a) a.begin(),a.end()
#define ceri(a,l,r) {for(ll i_ = l;i_<=r;i_++) cerr<<a[i_]<< " ";cerr<<endl;}
using namespace std;
#define maxn 5005
ll n;
ll a[maxn];
ll b[maxn];
ll c[maxn];
void exploreCave(int N) {
    n = N;
    for(ll i = 0;i<n;i++) b[i] = -1;
    for(ll i = 0;i<n;i++) c[i] = 0;
    if(tryCombination(c)==-1){
        for(ll i = 0;i<n;i++) c[i] = 1;
        for(ll i = 0;i<n;i++){
            ceri(b,0,n-1);
            for(ll j = 0;j<n;j++){
                if(b[j]!=-1) continue;
                c[j] = 0;
                ll e = tryCombination(c);
                //ceri(c,0,n-1);
                //cerr<<j<< "  "<<e<<endl;
                if(i==n-1){
                    if(e==-1){
                        b[j] = i;
                        answer(a,b);
                    }
                }else{
                    if(e>i){
                        b[j] = i;
                        goto lol;
                    }
                }
                c[j] = 1;
            }
            lol:;
        }
    }
}

Compilation message (stderr)

cave.cpp: In function 'void exploreCave(int)':
cave.cpp:29:23: error: cannot convert 'long long int*' to 'int*'
   29 |     if(tryCombination(c)==-1){
      |                       ^
      |                       |
      |                       long long int*
In file included from cave.cpp:1:
cave.h:8:24: note:   initializing argument 1 of 'int tryCombination(int*)'
    8 | int tryCombination(int S[]);
      |                    ~~~~^~~
cave.cpp:36:39: error: cannot convert 'long long int*' to 'int*'
   36 |                 ll e = tryCombination(c);
      |                                       ^
      |                                       |
      |                                       long long int*
In file included from cave.cpp:1:
cave.h:8:24: note:   initializing argument 1 of 'int tryCombination(int*)'
    8 | int tryCombination(int S[]);
      |                    ~~~~^~~
cave.cpp:42:32: error: cannot convert 'long long int*' to 'int*'
   42 |                         answer(a,b);
      |                                ^
      |                                |
      |                                long long int*
In file included from cave.cpp:1:
cave.h:9:17: note:   initializing argument 1 of 'void answer(int*, int*)'
    9 | void answer(int S[], int D[]);
      |             ~~~~^~~