Submission #426556

# Submission time Handle Problem Language Result Execution time Memory
426556 2021-06-14T06:35:57 Z 장태환(#7571) Ancient Machine (JOI21_ancient_machine) C++17
0 / 100
71 ms 8080 KB
#include "Anna.h"
#include <vector>

namespace {

int variable_example = 0;

}

void Anna(int N, std::vector<char> S)
{
    int i;
    int isx=0;
    for(i=0;i<N;i++)
    {
        if(S[i]=='X')
        {
            Send(!isx);
            isx=1;
        }
        else
        {
            Send(isx&&(S[i]=='Z'));
        }
    }
}
#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)
{
  for (int i = N-1; i >=0; i--)
  {
    if(!A[i])
        Remove(i);
  }
  for (int i = 0; i < N; i++)
  {
    if(A[i])
        Remove(i);
  }
}

Compilation message

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 time Memory Grader output
1 Incorrect 1 ms 496 KB Wrong Answer [6]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 71 ms 8080 KB Wrong Answer [6]
2 Halted 0 ms 0 KB -