Submission #543079

#TimeUsernameProblemLanguageResultExecution timeMemory
543079LittleCubeAncient Machine (JOI21_ancient_machine)C++17
0 / 100
22 ms2804 KiB
#include "Anna.h" #include <vector> namespace { int variable_example = 0; } void Anna(int N, std::vector<char> S) { int i = 0; while(i < N && S[i] != 'X') { Send(0); i++; } if(i == N) return; Send(1); i++; char tar = 'Y'; while(i < N) { if(S[i] == tar) { Send(1); tar = (tar == 'Y' ? 'Z' : 'Y'); } else Send(0); i++; } }
#include "Bruno.h" #include <vector> namespace { int variable_example = 0; int FunctionExample(int P) { return 1 - P; } } // namespace void Bruno(int N, int L, std::vector<int> A) { int i = 0, j = 0, x = 0, y = 0, z = 0; for(; i < N; i++) if(A[i] == 1) { x = i; for(; j < i; j++) Remove(j); j = x + 1; break; } for(; i < N; i++) { if(y == 0 && A[i]) y = i; else if(y && A[i]) { z = i; for(; j < y; j++) Remove(j); j++; for(; j < z; j++) Remove(j); Remove(y); Remove(z); j = z + 1; } } for(; j < N; j++) Remove(j); Remove(x); }

Compilation message (stderr)

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

Bruno.cpp:8:5: warning: 'int {anonymous}::FunctionExample(int)' defined but not used [-Wunused-function]
    8 | int FunctionExample(int P) { return 1 - P; }
      |     ^~~~~~~~~~~~~~~
Bruno.cpp:6:5: warning: '{anonymous}::variable_example' defined but not used [-Wunused-variable]
    6 | int variable_example = 0;
      |     ^~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...