Submission #1366064

#TimeUsernameProblemLanguageResultExecution timeMemory
1366064haiphong5g0Message (IOI24_message)C++20
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
#include <send_packet.h>
#define task "TEST"
#define task2 "A"
#define pl pair<ll, ll>
#define VI vector<int>
#define VL vector<ll>
#define pf push_front
#define pb push_back
#define pob pop_back
#define pof pop_front
#define mp make_pair
#define fi first
#define se second
#define FOR(i, a, b, c) for (int i=a; i<=b; i+=c)
#define FORE(i, a, b, c) for (int i=a; i>=b; i+=c)
using namespace std;
using ll = long long;
using ull = unsigned long long;
const int Mod = 1e9+7;
const int maxn = 2e5;
const ll Inf = 1e16;
ll n, q, dp[maxn+1];
const int check = 25;
void send_message(vector<bool> M, vector<bool> C)
{
    vector<bool> F(0, 31), F2(1, 31);
    vector<int> V;
    FOR(i, 0, 30, 1) {
        if (C[i] == 1) V.pb(i);
    }
    int n = M.size();
    for (auto p : V) {
        if (n % 2 == 1) F2[p] = 1;
        else F2[p] = 0;
        n /= 2;
    }
    while (M.size() < 1024) M.pb(0);
    FOR(i, 1, check, 1) send_packet(F);
    send_packet(F2);
    int j = 0;
    FOR(i, 1, 64, 1) {
        vector<bool> V2(0, 31);
        FOR(j, 0, 15, 1) V2[V[j]] = M[16*(i-1)+j];
        send_packet(V2);
    }
}
vector<bool> receive_message(vector<vector<bool>> R) 
{
    vector<bool> res, safe(32, 1);
    int num = 1, s = 0;
    FOR(i, 0, check-1, 1) {
        FOR(j, 0, 30, 1) {
            if (R[i][j] == 0) safe[j] = 0;
        }
    }
    FOR(j, 0, 30, 1) {
        if (!safe[j]) continue;
        s += num * R[check][j]; num *= 2;
    }
    FOR(i, check+1, R.size()-1, 1) {
        FOR(j, 0, 30, 1) {
            if (!safe[j]) continue;
            res.pb(R[i][j]);
        }
    }
    return res;
}
/*void Read()
{
    //15 12 2 10 21
    //4 2 3 3 1
}
void Solve()
{
    for (auto p : calculate_costs({1, 100, 200, 300, 400}, {5, 4, 5, 6, 10}, {1, 2, 2, 3, 2}, {99, 100, 200})) cout << p << '\n';
}
int main()
{
    if (fopen (task".inp", "r")) {
        freopen (task".inp", "r", stdin);
        freopen (task".out", "w", stdout);
    }
    ios_base::sync_with_stdio(0);
    cin.tie(0); cout.tie(0);
    int t;
    for (t=1; t--;)
    {
        Read(); Solve();
    }
}*/

Compilation message (stderr)

message.cpp:2:10: fatal error: send_packet.h: No such file or directory
    2 | #include <send_packet.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.