Submission #836122

#TimeUsernameProblemLanguageResultExecution timeMemory
836122tengiz05Catfish Farm (IOI22_fish)C++17
Compilation error
0 ms0 KiB
#include "prison.h"

#include <bits/stdc++.h>
using namespace std;

vector<vector<int>> devise_strategy(int n) {
    vector<vector<int>> f(13 * 4, vector<int>(n + 1));
    for (int i = 0; i < 13 * 4; i++) {
        int num = 8 - (i >> 2);
        int A = i & 1;
        int res = i >> 1 & 1;
        if (A == 0) {
            f[i][0] = 0;
            for (int j = 1; j <= n; j++) {
                int bit = j >> num & 1;
                f[i][j] = ((8 - num) << 2) | (bit << 1) | 1;
            }
        }
        if (A == 1) {
            f[i][0] = 1;
            for (int j = 1; j <= n; j++) {
                int bit = j >> num & 1;
                if (bit == res) {
                    f[i][j] = (8 - num + 1) << 2;
                } else {
                    if (res < bit) {
                        f[i][j] = -1;
                    } else {
                        f[i][j] = -2;
                    }
                }
            }
        }
    }
    for (int i = 0; i < f.size(); i++) {
        for (int j = 0; j <= n; j++) {
            if (f[i][j] >= 13 * 4) f[i][j] = 0;
            // cout << f[i][j] << " \n"[j == n];
        }
    }
    return f;
}

Compilation message (stderr)

fish.cpp:1:10: fatal error: prison.h: No such file or directory
    1 | #include "prison.h"
      |          ^~~~~~~~~~
compilation terminated.