Submission #588847

#TimeUsernameProblemLanguageResultExecution timeMemory
588847SeDunionBroken Device 2 (JOI22_device2)C++17
Compilation error
0 ms0 KiB
#include "Anna.h" #include <utility> #include <vector> using namespace std; using vi = vector<int>; using ll = long long; namespace { int variable_example = 0; } int Declare() { return 2000; } pair<vi,vi> Anna(ll A) { vi X, Y; while (A--) X.emplace_back(1); while ((int)X.size() < 2000) X.emplace_back(0); while ((int)Y.size() < 2000) Y.emplace_back(0); return make_pair(X, Y); }
#include "Anna.h" #include <utility> #include <vector> using namespace std; using vi = vector<int>; using ll = long long; namespace { int variable_example = 0; } int Declare() { return 2000; } pair<vi,vi> Anna(ll A) { vi X, Y; while (A--) X.emplace_back(1); while ((int)X.size() < 2000) X.emplace_back(0); while ((int)Y.size() < 2000) Y.emplace_back(0); return make_pair(X, Y); } ❯ cat Bruno.cpp #include "Bruno.h" #include <utility> #include <vector> using namespace std; using vi = vector<int>; using ll = long long; namespace { int variable_example = 0; } ll Bruno(vi u) { int cnt = 0; for (int i : u) cnt += i; return cnt; }

Compilation message (stderr)

Anna.cpp:11:5: warning: '{anonymous}::variable_example' defined but not used [-Wunused-variable]
   11 | int variable_example = 0;
      |     ^~~~~~~~~~~~~~~~

Bruno.cpp:26:1: error: extended character ❯ is not valid in an identifier
   26 | ❯ cat Bruno.cpp
      | ^
Bruno.cpp:26:1: error: '\U0000276f' does not name a type
   26 | ❯ cat Bruno.cpp
      | ^
Bruno.cpp:37:5: error: redefinition of 'int {anonymous}::variable_example'
   37 | int variable_example = 0;
      |     ^~~~~~~~~~~~~~~~
Bruno.cpp:11:5: note: 'int {anonymous}::variable_example' previously defined here
   11 | int variable_example = 0;
      |     ^~~~~~~~~~~~~~~~
Bruno.cpp:11:5: warning: '{anonymous}::variable_example' defined but not used [-Wunused-variable]