Submission #402290

# Submission time Handle Problem Language Result Execution time Memory
402290 2021-05-11T14:34:27 Z IloveN Languages (IOI10_languages) C++14
Compilation error
0 ms 0 KB
#include<bits/stdc++.h>
#include "grader.h"

using namespace std;
#define ll long long
#define pii pair<int,int>
#define pll pair<ll,ll>
#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define eb emplace_back
#define all(vr) vr.begin(),vr.end()
#define vi vector<int>
#define vll vector<ll>
const int N = 1e5 + 10;

int in[60][N];

void excerpt(int E[])
{
    ll id = 0, mx = -1;
    for (int i = 0; i <= 55; ++i)
    {
        l score = 0, d = 0;
        for (int j = 0; j < 100; ++j)
            if (in[i][E[j]]) score += ++d;
            else d = 0;
        if (score > mx) id = i, mx = score;
    }
    id = language(id);
    for (int x : st) in[id][x] = 1;
}

/*int main()
{
    //freopen("ss.inp", "r", stdin);
    ios::sync_with_stdio(false);
    cin.tie(0);
    return 0;
}*/

Compilation message

lang.cpp: In function 'void excerpt(int*)':
lang.cpp:25:9: error: 'l' was not declared in this scope
   25 |         l score = 0, d = 0;
      |         ^
lang.cpp:27:30: error: 'score' was not declared in this scope
   27 |             if (in[i][E[j]]) score += ++d;
      |                              ^~~~~
lang.cpp:27:41: error: 'd' was not declared in this scope
   27 |             if (in[i][E[j]]) score += ++d;
      |                                         ^
lang.cpp:28:18: error: 'd' was not declared in this scope
   28 |             else d = 0;
      |                  ^
lang.cpp:29:13: error: 'score' was not declared in this scope
   29 |         if (score > mx) id = i, mx = score;
      |             ^~~~~
lang.cpp:32:18: error: 'st' was not declared in this scope; did you mean 'std'?
   32 |     for (int x : st) in[id][x] = 1;
      |                  ^~
      |                  std