Submission #715759

#TimeUsernameProblemLanguageResultExecution timeMemory
715759aykhnCave (IOI13_cave)C++14
13 / 100
12 ms448 KiB
#include <bits/stdc++.h>
#include "cave.h"

using namespace std;

typedef long long ll;
typedef unsigned long long ull;

#define OPT ios_base::sync_with_stdio(0); \
            cin.tie(0); \
            cout.tie(0)

#define pii pair<int,int>
#define pll pair<ll,ll>
#define pull pair<ull,ull>
#define endl "\n"
#define all(v) v.begin(), v.end()
#define mpr make_pair
#define pb push_back
#define ts to_string
#define fi first
#define se second
#define inf 0x3F3F3F3F
#define bpc __builtin_popcount
#define print(v) for(int i = 0; i < v.size(); i++) \
                    cout << v[i] << " "; \
                    cout<<endl;

void solve(int n)
{
    int arr[n];
    for (int i = 0; i < n; i++) arr[i] = 0;
    int ans[n];
    for (int i = 0; i < n; i++)
    {
        arr[i] = 1;
        int x = tryCombination(arr);
        ans[i] = x;
        arr[i] = 0;
    }

    answer(arr, ans);
}

void exploreCave(int n)
{
    int arr[n];
    for (int i = 0; i < n; i++) arr[i] = 0;

    int ans = tryCombination(arr);

    if (ans == -1)
    {
        solve(n);
    }
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...