Submission #306376

# Submission time Handle Problem Language Result Execution time Memory
306376 2020-09-25T10:24:38 Z amunduzbaev Cave (IOI13_cave) C++14
Compilation error
0 ms 0 KB
#include "cave.h"
#include <bits/stdc++.h>
using namespace std;
 
void exploreCave(int n) {
	int v[n],ans[n];
  memset(v,0,sizeof(v));
    for(int i=0;i<n;i++){
        ans[i]=i;
    }
 
    int cor = tryCombination(v);
    while(cor!=-1){
        v[cor]=1;
        *cor=*tryCombination(v);
    }
    answer(v,ans);
}

Compilation message

cave.cpp: In function 'void exploreCave(int)':
cave.cpp:15:10: error: invalid type argument of unary '*' (have 'int')
   15 |         *cor=*tryCombination(v);
      |          ^~~
cave.cpp:15:31: error: invalid type argument of unary '*' (have 'int')
   15 |         *cor=*tryCombination(v);
      |                               ^