Submission #201774

#TimeUsernameProblemLanguageResultExecution timeMemory
201774luciocfLanguages (IOI10_languages)C++14
Compilation error
0 ms0 KiB
include <bits/stdc++.h> #include "grader.h" #include "lang.h" #define SZ 100 using namespace std; int ant[60][110]; int lang[10010]; int vez; void excerpt(int *E) { map<int, bool> aparece; for (int i = 1; i <= 100; i++) aparece[E[i-1]] = 1; int opt = 1; int mx_ig = 0; for (int i = 0; i <= 55; i++) { set<int> dist; for (int j = 1; j <= 100; j++) if (aparece[ant[i][j]]) dist.insert(ant[i][j]); if ((int)dist.size() > mx_ig) opt = i, mx_ig = (int)dist.size(); } for (int i = 1; i <= 100; i++) ant[language(opt)][i] = E[i-1]; }

Compilation message (stderr)

lang.cpp:1:1: error: 'include' does not name a type; did you mean '__has_include'?
 include <bits/stdc++.h>
 ^~~~~~~
 __has_include
lang.cpp: In function 'void excerpt(int*)':
lang.cpp:17:2: error: 'map' was not declared in this scope
  map<int, bool> aparece;
  ^~~
lang.cpp:17:6: error: expected primary-expression before 'int'
  map<int, bool> aparece;
      ^~~
lang.cpp:20:3: error: 'aparece' was not declared in this scope
   aparece[E[i-1]] = 1;
   ^~~~~~~
lang.cpp:27:3: error: 'set' was not declared in this scope
   set<int> dist;
   ^~~
lang.cpp:27:7: error: expected primary-expression before 'int'
   set<int> dist;
       ^~~
lang.cpp:30:8: error: 'aparece' was not declared in this scope
    if (aparece[ant[i][j]])
        ^~~~~~~
lang.cpp:31:5: error: 'dist' was not declared in this scope
     dist.insert(ant[i][j]);
     ^~~~
lang.cpp:31:5: note: suggested alternative: 'int'
     dist.insert(ant[i][j]);
     ^~~~
     int
lang.cpp:33:12: error: 'dist' was not declared in this scope
   if ((int)dist.size() > mx_ig)
            ^~~~
lang.cpp:33:12: note: suggested alternative: 'int'
   if ((int)dist.size() > mx_ig)
            ^~~~
            int
lang.cpp:38:7: error: 'language' was not declared in this scope
   ant[language(opt)][i] = E[i-1];
       ^~~~~~~~
lang.cpp:38:7: note: suggested alternative: 'lang'
   ant[language(opt)][i] = E[i-1];
       ^~~~~~~~
       lang