Submission #62160

# Submission time Handle Problem Language Result Execution time Memory
62160 2018-07-27T15:52:51 Z reality Parrots (IOI11_parrots) C++17
Compilation error
0 ms 0 KB
# include "grader.h"
# include <bits/stdc++.h>
using namespace std;
# define x first
# define y second
# define ll long long
# define vi vector < int >
# define vl vector < ll >
# define pii pair < int , int >
# define mp make_pair
# define vii vector < pii >
# define pb push_back
template < class T > T smin(T &a,T b) {if (a > b) a = b;return a;}
template < class T > T smax(T &a,T b) {if (a < b) a = b;return a;}
void encode(int N, int M[])
{
    int n = N;
    static vi v[1 << 20];
    int cnt = -1;
    for (int i = 0;i <= 7;++i)
        for (int j = 0;j <= 7;++j)
            for (int k = 0;k <= 7;++k)
                for (int l = 0;l <= 7;++l)
                    if (i + j + k + l <= 7)
                        ++cnt,v[cnt] = {i,j,k,l};
    for (int i = 0; i < n; i++)
    {
        const int cur = M[i];
        for (int j = 0;j < 4;++j)
            for (int k = 0;k < v[cur][j];++k)
                send(i * 4 + j);
    }
}
# include "grader.h"
# include <bits/stdc++.h>
using namespace std;
# define x first
# define y second
# define ll long long
# define vi vector < int >
# define vl vector < ll >
# define pii pair < int , int >
# define mp make_pair
# define vii vector < pii >
# define pb push_back
template < class T > T smin(T &a,T b) {if (a > b) a = b;return a;}
template < class T > T smax(T &a,T b) {if (a < b) a = b;return a;}
void decode(int N, int L, int X[])
{
    static map < vi , int > M;
    M.clear();
    int cnt = -1;
    for (int i = 0;i <= 7;++i)
        for (int j = 0;j <= 7;++j)
            for (int k = 0;k <= 7;++k)
                for (int l = 0;l <= 7;++l)
                    if (i + j + k + l <= 7)
                        M[{i,j,k,l}] = ++cnt;
    int n = N;
    vi ss[n];
    for (int i = 0;i < n;++i)
        ss[i].resize(4);
    for (int i = 0;i < n;++i)
        for (int j = 0;j < 4;++j)
            ss[i][j] = 0;
    for (int i = 0;i < L;++i)
        {
            int cnt = X[i];
            int pos = cnt / 4;
            cnt %= 4;
            ss[pos][cnt] += 1;
        }
    for (int i = 0; i < n; i++)
        output(M[{ss[i][0],ss[i][1],ss[i][2],ss[i][3]}]);
}

Compilation message

encoder.cpp:1:11: fatal error: grader.h: No such file or directory
 # include "grader.h"
           ^~~~~~~~~~
compilation terminated.

decoder.cpp:1:11: fatal error: grader.h: No such file or directory
 # include "grader.h"
           ^~~~~~~~~~
compilation terminated.