Submission #426580

# Submission time Handle Problem Language Result Execution time Memory
426580 2021-06-14T07:11:51 Z 최서현(#7489) Ancient Machine (JOI21_ancient_machine) C++17
0 / 100
88 ms 7748 KB
#include "Anna.h"
#include <bits/stdc++.h>
#define pii pair<int, int>
#define ff first
#define ss second

using namespace std;

namespace
{

}

void Anna(int N, vector<char> S)
{
    int start = -1, last = -1;
    for(int i = 0; i < N; ++i)
    {
        if(start == -1 && S[i] == 'X') start = i;
        if(S[i] == 'Z') last = i;
    }

    if(start == -1 || last == -1)
    {
        for(int i = 0; i < N; ++i)
            Send(i);
        return;
    }

    for(int i = 0; i < start; ++i) Send(0);
    Send(1);
    for(int i = start + 1; i < last; ++i)
    {
        if(S[i] == 'X' && S[i - 1] == 'Y') Send(1);
        else if(S[i] == 'Y' && S[i + 1] == 'X') Send(1);
        else Send(0);
    }
    Send(1);
    for(int i = last + 1; i < N; ++i) Send(0);
}
#include "Bruno.h"
#include <bits/stdc++.h>

using namespace std;

namespace
{

}

void Bruno(int N, int L, vector<int> A)
{
    int last = -1;
    for(int i = 0; i < N; ++i) if(A[i]) last = i;
    for(int i = 0; i < N; ++i) if(!A[i]) Remove(i);
    for(int i = last - 1; i >= 0; --i) if(A[i]) Remove(i);
    Remove(last);
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 484 KB Output is correct
2 Correct 1 ms 484 KB Output is correct
3 Correct 0 ms 484 KB Output is correct
4 Correct 1 ms 484 KB Output is correct
5 Correct 1 ms 484 KB Output is correct
6 Correct 1 ms 484 KB Output is correct
7 Correct 1 ms 484 KB Output is correct
8 Correct 0 ms 484 KB Output is correct
9 Incorrect 2 ms 484 KB Wrong Answer [1]
10 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Partially correct 75 ms 7748 KB Partially correct
2 Partially correct 85 ms 7564 KB Partially correct
3 Partially correct 71 ms 7584 KB Partially correct
4 Partially correct 84 ms 7644 KB Partially correct
5 Partially correct 78 ms 7684 KB Partially correct
6 Partially correct 85 ms 7708 KB Partially correct
7 Partially correct 79 ms 7584 KB Partially correct
8 Partially correct 75 ms 7532 KB Partially correct
9 Partially correct 73 ms 7592 KB Partially correct
10 Partially correct 77 ms 7572 KB Partially correct
11 Partially correct 88 ms 7712 KB Partially correct
12 Partially correct 71 ms 7656 KB Partially correct
13 Partially correct 77 ms 7624 KB Partially correct
14 Partially correct 71 ms 7616 KB Partially correct
15 Partially correct 75 ms 7608 KB Partially correct
16 Partially correct 74 ms 7644 KB Partially correct
17 Incorrect 9 ms 720 KB Wrong Answer [1]
18 Halted 0 ms 0 KB -