Submission #712619

#TimeUsernameProblemLanguageResultExecution timeMemory
712619hoainiemAncient Machine (JOI21_ancient_machine)C++17
30 / 100
91 ms9284 KiB
#include "Anna.h" #include<bits/stdc++.h> using namespace std; namespace { int variable_example = 0; } void Anna(int N, std::vector<char> S) { for (char c : S) if (c == 'X'){ Send(0); Send(0); } else{ if (c == 'Y'){ Send(0); Send(1); } else{ Send(1); Send(0); } } }
#include "Bruno.h" #include<bits/stdc++.h> using namespace std; namespace { int variable_example = 0; int FunctionExample(int P) { return 1 - P; } } // namespace string s; stack<int>pq; void Bruno(int N, int L, std::vector<int> A) { for (int i = 0, j = 0; i < N; i++, j += 2){ if (A[j] == 0){ if (A[j + 1] == 0) s.push_back('x'); else s.push_back('y'); } else s.push_back('z'); } int l = 0, ptr, r = N - 1; while (l < N && s[l] != 'x') Remove(l++); if (l == N) return; while (r >= l && s[r] != 'z') Remove(r--); if (l > r) return; for (int i = l, j = l; i <= r; i++){ if (s[i] != 'z') continue; for (int k = i - 1; k > j; k--) Remove(k); Remove(i); j = i; } Remove(l); }

Compilation message (stderr)

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

Bruno.cpp: In function 'void Bruno(int, int, std::vector<int>)':
Bruno.cpp:24:16: warning: unused variable 'ptr' [-Wunused-variable]
   24 |     int l = 0, ptr, r = N - 1;
      |                ^~~
Bruno.cpp: At global scope:
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...