Submission #1277029

#TimeUsernameProblemLanguageResultExecution timeMemory
1277029almaz동굴 (IOI13_cave)C++20
Compilation error
0 ms0 KiB
#include "cave.h" #include <bits/stdc++.h> using namespace std; // #define int long long // #define endl '\n' #define ff first #define ss second #define pb push_back #define all(a) a.begin(), a.end() #define rall(a) a.rbegin(), a.rend() #define ar array const int MOD = 1e9 + 7,INF = 1e9, N = 2e5 + 5; /* */ void exploreCave(int n){ vector <int> ans(n , 0); for(int i = 0;i < n;i++){ int x = tryCombination(ans); if(x == i){ ans[i] = 1; } } answer(ans); }

Compilation message (stderr)

cave.cpp: In function 'void exploreCave(int)':
cave.cpp:22:40: error: cannot convert 'std::vector<int>' to 'int*'
   22 |                 int x = tryCombination(ans);
      |                                        ^~~
      |                                        |
      |                                        std::vector<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:27:16: error: cannot convert 'std::vector<int>' to 'int*'
   27 |         answer(ans);
      |                ^~~
      |                |
      |                std::vector<int>
cave.h:9:17: note:   initializing argument 1 of 'void answer(int*, int*)'
    9 | void answer(int S[], int D[]);
      |             ~~~~^~~