Submission #512959

#TimeUsernameProblemLanguageResultExecution timeMemory
512959Markomafko972Languages (IOI10_languages)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include <stdlib.h> #include <stdio.h> #include "grader.h" #include "lang.h" #define long long unsigned long long using namespace std; unordered_map<int, long long> m[60]; set<long long> s; vector<long long> v; void excerpt(int *E) { s.clear(); v.clear(); for (int i = 0; i < 100; i++) { E[i]--; s.insert(E[i]); if (i > 0) s.insert((long long)65535*(long long)E[i-1]+(long long)E[i]); if (i > 1) { long long u = E[i-2]; u = u * (long long)65535 + (long long)E[i-1]; u = u * (long long)65535 + (long long)E[i]; s.insert(u); } if (i > 2 && (i <= 40 || i >= 90 || i % 2 == 0 || i % 3 == 0 || i % 5 == 0 || i % 7 == 0 || i % 11 == 0)) { long long u = E[i-3]; u = u * (long long)65535 + (long long)E[i-2]; u = u * (long long)65535 + (long long)E[i-1]; u = u * (long long)65535 + (long long)E[i]; s.insert(u); } } for (set<long long> :: iterator it = s.begin(); it != s.end(); it++) v.push_back(*it); int maxim = -1, maxiv = -1, koji = 0; for (int i = 0; i < 56; i++) { int kolm = 0, kolv = 0; for (int j = 0; j < v.size(); j++) { if (m[i].find(v[j]) != m[i].end()) { if (v[j] > (long long)65535*(long long)65535*(long long)20000) kolv++; else kolm++; } //if (j > 1 && m[i][(long long)65535*(long long)65535*(long long)v[j-2]+(long long)65535*(long long)v[j-1]+(long long)v[j]]) kol++; } if (kolm+kolv > maxim+maxiv || (kolm+kolv+5 > maxim+maxiv && kolv > maxiv)) { //if (kolm+kolv >= maxim+maxiv+2 || kolv >= maxiv) { maxim = kolm; maxiv = kolv; koji = i; //} } } int pravi = language(koji); for (int i = 0; i < v.size(); i++) { m[pravi][v[i]]++; //if (i > 1) m[pravi][(long long)65535*(long long)65535*(long long)v[i-2]+(long long)65535*(long long)v[i-1]+(long long)v[i]]++; } }

Compilation message (stderr)

lang.cpp:6:33: error: 'long long long' is too long for GCC
    6 | #define long long unsigned long long
      |                                 ^~~~
lang.cpp:10:20: note: in expansion of macro 'long'
   10 | unordered_map<int, long long> m[60];
      |                    ^~~~
lang.cpp:6:14: error: 'long long long' is too long for GCC
    6 | #define long long unsigned long long
      |              ^~~~
lang.cpp:10:25: note: in expansion of macro 'long'
   10 | unordered_map<int, long long> m[60];
      |                         ^~~~
lang.cpp:6:19: error: duplicate 'unsigned'
    6 | #define long long unsigned long long
      |                   ^~~~~~~~
lang.cpp:10:25: note: in expansion of macro 'long'
   10 | unordered_map<int, long long> m[60];
      |                         ^~~~
lang.cpp:6:28: error: 'long long long' is too long for GCC
    6 | #define long long unsigned long long
      |                            ^~~~
lang.cpp:10:25: note: in expansion of macro 'long'
   10 | unordered_map<int, long long> m[60];
      |                         ^~~~
lang.cpp:6:33: error: 'long long long' is too long for GCC
    6 | #define long long unsigned long long
      |                                 ^~~~
lang.cpp:10:25: note: in expansion of macro 'long'
   10 | unordered_map<int, long long> m[60];
      |                         ^~~~
lang.cpp:6:33: error: 'long long long' is too long for GCC
    6 | #define long long unsigned long long
      |                                 ^~~~
lang.cpp:11:5: note: in expansion of macro 'long'
   11 | set<long long> s;
      |     ^~~~
lang.cpp:6:14: error: 'long long long' is too long for GCC
    6 | #define long long unsigned long long
      |              ^~~~
lang.cpp:11:10: note: in expansion of macro 'long'
   11 | set<long long> s;
      |          ^~~~
lang.cpp:6:19: error: duplicate 'unsigned'
    6 | #define long long unsigned long long
      |                   ^~~~~~~~
lang.cpp:11:10: note: in expansion of macro 'long'
   11 | set<long long> s;
      |          ^~~~
lang.cpp:6:28: error: 'long long long' is too long for GCC
    6 | #define long long unsigned long long
      |                            ^~~~
lang.cpp:11:10: note: in expansion of macro 'long'
   11 | set<long long> s;
      |          ^~~~
lang.cpp:6:33: error: 'long long long' is too long for GCC
    6 | #define long long unsigned long long
      |                                 ^~~~
lang.cpp:11:10: note: in expansion of macro 'long'
   11 | set<long long> s;
      |          ^~~~
lang.cpp:6:33: error: 'long long long' is too long for GCC
    6 | #define long long unsigned long long
      |                                 ^~~~
lang.cpp:12:8: note: in expansion of macro 'long'
   12 | vector<long long> v;
      |        ^~~~
lang.cpp:6:14: error: 'long long long' is too long for GCC
    6 | #define long long unsigned long long
      |              ^~~~
lang.cpp:12:13: note: in expansion of macro 'long'
   12 | vector<long long> v;
      |             ^~~~
lang.cpp:6:19: error: duplicate 'unsigned'
    6 | #define long long unsigned long long
      |                   ^~~~~~~~
lang.cpp:12:13: note: in expansion of macro 'long'
   12 | vector<long long> v;
      |             ^~~~
lang.cpp:6:28: error: 'long long long' is too long for GCC
    6 | #define long long unsigned long long
      |                            ^~~~
lang.cpp:12:13: note: in expansion of macro 'long'
   12 | vector<long long> v;
      |             ^~~~
lang.cpp:6:33: error: 'long long long' is too long for GCC
    6 | #define long long unsigned long long
      |                                 ^~~~
lang.cpp:12:13: note: in expansion of macro 'long'
   12 | vector<long long> v;
      |             ^~~~
lang.cpp: In function 'void excerpt(int*)':
lang.cpp:6:33: error: 'long long long' is too long for GCC
    6 | #define long long unsigned long long
      |                                 ^~~~
lang.cpp:20:30: note: in expansion of macro 'long'
   20 |         if (i > 0) s.insert((long long)65535*(long long)E[i-1]+(long long)E[i]);
      |                              ^~~~
lang.cpp:6:14: error: 'long long long' is too long for GCC
    6 | #define long long unsigned long long
      |              ^~~~
lang.cpp:20:35: note: in expansion of macro 'long'
   20 |         if (i > 0) s.insert((long long)65535*(long long)E[i-1]+(long long)E[i]);
      |                                   ^~~~
lang.cpp:6:19: error: duplicate 'unsigned'
    6 | #define long long unsigned long long
      |                   ^~~~~~~~
lang.cpp:20:35: note: in expansion of macro 'long'
   20 |         if (i > 0) s.insert((long long)65535*(long long)E[i-1]+(long long)E[i]);
      |                                   ^~~~
lang.cpp:6:28: error: 'long long long' is too long for GCC
    6 | #define long long unsigned long long
      |                            ^~~~
lang.cpp:20:35: note: in expansion of macro 'long'
   20 |         if (i > 0) s.insert((long long)65535*(long long)E[i-1]+(long long)E[i]);
      |                                   ^~~~
lang.cpp:6:33: error: 'long long long' is too long for GCC
    6 | #define long long unsigned long long
      |                                 ^~~~
lang.cpp:20:35: note: in expansion of macro 'long'
   20 |         if (i > 0) s.insert((long long)65535*(long long)E[i-1]+(long long)E[i]);
      |                                   ^~~~
lang.cpp:6:33: error: 'long long long' is too long for GCC
    6 | #define long long unsigned long long
      |                                 ^~~~
lang.cpp:20:47: note: in expansion of macro 'long'
   20 |         if (i > 0) s.insert((long long)65535*(long long)E[i-1]+(long long)E[i]);
      |                                               ^~~~
lang.cpp:6:14: error: 'long long long' is too long for GCC
    6 | #define long long unsigned long long
      |              ^~~~
lang.cpp:20:52: note: in expansion of macro 'long'
   20 |         if (i > 0) s.insert((long long)65535*(long long)E[i-1]+(long long)E[i]);
      |                                                    ^~~~
lang.cpp:6:19: error: duplicate 'unsigned'
    6 | #define long long unsigned long long
      |                   ^~~~~~~~
lang.cpp:20:52: note: in expansion of macro 'long'
   20 |         if (i > 0) s.insert((long long)65535*(long long)E[i-1]+(long long)E[i]);
      |                                                    ^~~~
lang.cpp:6:28: error: 'long long long' is too long for GCC
    6 | #define long long unsigned long long
      |                            ^~~~
lang.cpp:20:52: note: in expansion of macro 'long'
   20 |         if (i > 0) s.insert((long long)65535*(long long)E[i-1]+(long long)E[i]);
      |                                                    ^~~~
lang.cpp:6:33: error: 'long long long' is too long for GCC
    6 | #define long long unsigned long long
      |                                 ^~~~
lang.cpp:20:52: note: in expansion of macro 'long'
   20 |         if (i > 0) s.insert((long long)65535*(long long)E[i-1]+(long long)E[i]);
      |                                                    ^~~~
lang.cpp:6:33: error: 'long long long' is too long for GCC
    6 | #define long long unsigned long long
      |                                 ^~~~
lang.cpp:20:65: note: in expansion of macro 'long'
   20 |         if (i > 0) s.insert((long long)65535*(long long)E[i-1]+(long long)E[i]);
      |                                                                 ^~~~
lang.cpp:6:14: error: 'long long long' is too long for GCC
    6 | #define long long unsigned long long
      |              ^~~~
lang.cpp:20:70: note: in expansion of macro 'long'
   20 |         if (i > 0) s.insert((long long)65535*(long long)E[i-1]+(long long)E[i]);
      |                                                                      ^~~~
lang.cpp:6:19: error: duplicate 'unsigned'
    6 | #define long long unsigned long long
      |                   ^~~~~~~~
lang.cpp:20:70: note: in expansion of macro 'long'
   20 |         if (i > 0) s.insert((long long)65535*(long long)E[i-1]+(long long)E[i]);
      |                                                                      ^~~~
lang.cpp:6:28: error: 'long long long' is too long for GCC
    6 | #define long long unsigned long long
      |                            ^~~~
lang.cpp:20:70: note: in expansion of macro 'long'
   20 |         if (i > 0) s.insert((long long)65535*(long long)E[i-1]+(long long)E[i]);
      |                                                                      ^~~~
lang.cpp:6:33: error: 'long long long' is too long for GCC
    6 | #define long long unsigned long long
      |                                 ^~~~
lang.cpp:20:70: note: in expansion of macro 'long'
   20 |         if (i > 0) s.insert((long long)65535*(long long)E[i-1]+(long long)E[i]);
      |                                                                      ^~~~
lang.cpp:6:33: error: 'long long long' is too long for GCC
    6 | #define long long unsigned long long
      |                                 ^~~~
lang.cpp:23:13: note: in expansion of macro 'long'
   23 |             long long u = E[i-2];
      |             ^~~~
lang.cpp:6:14: error: 'long long long' is too long for GCC
    6 | #define long long unsigned long long
      |              ^~~~
lang.cpp:23:18: note: in expansion of macro 'long'
   23 |             long long u = E[i-2];
      |                  ^~~~
lang.cpp:6:19: error: duplicate 'unsigned'
    6 | #define long long unsigned long long
      |                   ^~~~~~~~
lang.cpp:23:18: note: in expansion of macro 'long'
   23 |             long long u = E[i-2];
      |                  ^~~~
lang.cpp:6:28: error: 'long long long' is too long for GCC
    6 | #define long long unsigned long long
      |                            ^~~~
lang.cpp:23:18: note: in expansion of macro 'long'
   23 |             long long u = E[i-2];
      |                  ^~~~
lang.cpp:6:33: error: 'long long long' is too long for GCC
    6 | #define long long unsigned long long
      |                                 ^~~~
lang.cpp:23:18: note: in expansion of macro 'long'
   23 |             long long u = E[i-2];
      |                  ^~~~
lang.cpp:6:33: error: 'long long long' is too long for GCC
    6 | #define long long unsigned long long
      |                                 ^~~~
lang.cpp:24:22: note: in expansion of macro 'long'
   24 |             u = u * (long long)65535 + (long long)E[i-1];
      |                      ^~~~
lang.cpp:6:14: error: 'long long long' is too long for GCC
    6 | #define long long unsigned long long
      |              ^~~~
lang.cpp:24:27: note: in expansion of macro 'long'
   24 |             u = u * (long long)65535 + (long long)E[i-1];
      |                           ^~~~
lang.cpp:6:19: error: duplicate 'unsigned'
    6 | #define long long unsigned long long
      |                   ^~~~~~~~
lang.cpp:24:27: note: in expansion of macro 'long'
   24 |             u = u * (long long)65535 + (long long)E[i-1];
      |                           ^~~~
lang.cpp:6:28: error: 'long long long' is too long for GCC
    6 | #define long long unsigned long long
      |                            ^~~~
lang.cpp:24:27: note: in expansion of macro 'long'
   24 |             u = u * (long long)65535 + (long long)E[i-1];
      |                           ^~~~
lang.cpp:6:33: error: 'long long long' is too long for GCC
    6 | #define long long unsigned long long
      |                                 ^~~~
lang.cpp:24:27: note: in expansion of macro 'long'
   24 |             u = u * (long long)65535 + (long long)E[i-1];
      |                           ^~~~
lang.cpp:6:33: error: 'long long long' is too long for GCC
    6 | #define long long unsigned long long
      |                                 ^~~~
lang.cpp:24:41: note: in expansion of macro 'long'
   24 |             u = u * (long long)65535 + (long long)E[i-1];
      |                                         ^~~~
lang.cpp:6:14: error: 'long long long' is too long for GCC
    6 | #define long long unsigned long long
      |              ^~~~
lang.cpp:24:46: note: in expansion of macro 'long'
   24 |             u = u * (long long)65535 + (long long)E[i-1];
      |                                              ^~~~
lang.cpp:6:19: error: duplicate 'unsigned'
    6 | #define long long unsigned long long
      |                   ^~~~~~~~
lang.cpp:24:46: note: in expansion of macro 'long'
   24 |             u = u * (long long)65535 + (long long)E[i-1];
      |                                              ^~~~
lang.cpp:6:28: error: 'long long long' is too long for GCC
    6 | #define long long unsigned long long
      |                            ^~~~
lang.cpp:24:46: note: in expansion of macro 'long'
   24 |             u = u * (long long)65535 + (long long)E[i-1];
      |                                              ^~~~
lang.cpp:6:33: error: 'long long long' is too long for GCC
    6 | #define long long unsigned long long
      |                                 ^~~~
lang.cpp:24:46: note: in expansion of macro 'long'
   24 |             u = u * (long long)65535 + (long long)E[i-1];
      |                                              ^~~~
lang.cpp:6:33: error: 'long long long' is too long for GCC
    6 | #define long long unsigned long long
      |                                 ^~~~
lang.cpp:25:22: note: in expansion of macro 'long'
   25 |             u = u * (long long)65535 + (long long)E[i];
      |                      ^~~~
lang.cpp:6:14: error: 'long long long' is too long for GCC
    6 | #define long long unsigned long long
      |              ^~~~
lang.cpp:25:27: note: in expansion of macro 'long'
   25 |             u = u * (long long)65535 + (long long)E[i];
      |                           ^~~~
lang.cpp:6:19: error: duplicate 'unsigned'
    6 | #define long long unsigned long long
      |                   ^~~~~~~~
lang.cpp:25:27: note: in expansion of macro 'long'
   25 |             u = u * (long long)65535 + (long long)E[i];
      |                           ^~~~
lang.cpp:6:28: error: 'long long long' is too long for GCC
    6 | #define long long unsigned long long
      |                            ^~~~
lang.cpp:25:27: note: in expansion of macro 'long'
   25 |             u = u * (long long)65535 + (long long)E[i];
      |                           ^~~~
lang.cpp:6:33: error: 'long long long' is too long for GCC
    6 | #define long long unsigned long long
      |                                 ^~~~
lang.cpp:25:27: note: in expansion of macro 'long'
   25 |             u = u * (long long)65535 + (long long)E[i];
      |                           ^~~~
lang.cpp:6:33: error: 'long long long' is too long for GCC
    6 | #define long long unsigned long long
      |                                 ^~~~
lang.cpp:25:41: note: in expansion of macro 'long'
   25 |             u = u * (long long)65535 + (long long)E[i];
      |                                         ^~~~
lang.cpp:6:14: error: 'long long long' is too long for GCC
    6 | #define long long unsigned long long
      |              ^~~~
lang.cpp:25:46: note: in expansion of macro 'long'
   25 |             u = u * (long long)65535 + (long long)E[i];
      |                                              ^~~~
lang.cpp:6:19: error: duplicate 'unsigned'
    6 | #define long long unsigned long long
      |                   ^~~~~~~~
lang.cpp:25:46: note: in expansion of macro 'long'
   25 |             u = u * (long long)65535 + (long long)E[i];
      |                                              ^~~~
lang.cpp:6:28: error: 'long long long' is too long for GCC
    6 | #define long long unsigned long long
      |                            ^~~~
lang.cpp:25:46: note: in expansion of macro 'long'
   25 |             u = u * (long long)65535 + (long long)E[i];
      |                                              ^~~~
lang.cpp:6:33: error: 'long long long' is too long for GCC
    6 | #define long long unsigned long long
      |                                 ^~~~
lang.cpp:25:46: note: in expansion of macro 'long'
   25 |             u = u * (long long)65535 + (long long)E[i];
      |                                              ^~~~
lang.cpp:6:33: error: 'long long long' is too long for GCC
    6 | #define long long unsigned long long
      |                                 ^~~~
lang.cpp:30:13: note: in expansion of macro 'long'
   30 |