Submission #370574

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
3705742021-02-24 07:12:54FystyCave (IOI13_cave)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
#include "cave.h"
using namespace std;
typedef long long ll;
typedef pair<ll,ll> pll;
#define rep(i,n) for(int i=0;i<n;i++)
#define rep1(i,n) for(int i=1;i<n;i++)
#define F first
#define S second
#define pb push_back
//int tryCombination(vector<int> S);
//void answer(vector<int> S,vector<int> D);
bool vis[5005];
void exploreCave(int N)
{
int n=N;
ll a[n],tmp[n],tmp2[n],s[n],d[n];
rep(i,n) a[i]=0;
rep(i,n)
{
bool x=0;
if(tryCombination(a)==i) x=1;
vector<int> pos;
rep(i,n) tmp[i]=a[i];
if(x)
{
rep(i,n) if(!vis[i]) tmp[i]=1;
}
rep(i,n) if(!vis[i]) pos.pb(i);
int l=0,r=pos.size()-1;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

cave.cpp: In function 'void exploreCave(int)':
cave.cpp:22:27: error: cannot convert 'll*' {aka 'long long int*'} to 'int*'
   22 |         if(tryCombination(a)==i) x=1;
      |                           ^
      |                           |
      |                           ll* {aka long long int*}
In file included from cave.cpp:2:
cave.h:8:24: note:   initializing argument 1 of 'int tryCombination(int*)'
    8 | int tryCombination(int S[]);
      |                    ~~~~^~~
cave.cpp:33:22: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
   33 |             int mid=l+r>>1;
      |                     ~^~
cave.cpp:40:31: error: cannot convert 'll*' {aka 'long long int*'} to 'int*'
   40 |             if(tryCombination(tmp2)==i) r=mid;
      |                               ^~~~
      |                               |
      |                               ll* {aka long long int*}
In file included from cave.cpp:2:
cave.h:8:24: note:   initializing argument 1 of 'int tryCombination(int*)'
    8 | int tryCombination(int S[]);
      |                    ~~~~^~~
cave.cpp:48:12: error: cannot convert 'll*' {aka 'long long int*'} to 'int*'
   48 |     answer(s,d);
      |            ^
      |            |
      |            ll* {aka long long int*}
In file included from cave.cpp:2:
cave.h:9:17: note:   initializing argument 1 of 'void answer(int*, int*)'
    9 | void answer(int S[], int D[]);
      |             ~~~~^~~