Submission #684384

# Submission time Handle Problem Language Result Execution time Memory
684384 2023-01-21T05:39:20 Z mjhmjh1104 Ancient Machine (JOI21_ancient_machine) C++17
0 / 100
50 ms 7572 KB
#include "Anna.h"
#include <vector>
using namespace std;

void Anna(int n, vector<char> s) {
    for (int i = 1; i < n; i++) {
        if (s[i] != 'Y' && s[i - 1] == 'Y') Send(1);
        else Send(0);
    }
}
#include "Bruno.h"
#include <vector>
using namespace std;

void Bruno(int n, int l, vector<int> a) {
    vector<char> v;
    int lt = 0, k = 0;
    for (int i = 1; i < n; i++) {
        if (!a[i - 1]) continue;
        for (int j = i - 1; j >= lt; j--) Remove(j);
        lt = i;
    }
    for (int j = n - 1; j >= lt; j--) Remove(j);
}

Compilation message

Bruno.cpp: In function 'void Bruno(int, int, std::vector<int>)':
Bruno.cpp:7:17: warning: unused variable 'k' [-Wunused-variable]
    7 |     int lt = 0, k = 0;
      |                 ^
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 508 KB Wrong Answer [6]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 50 ms 7572 KB Wrong Answer [6]
2 Halted 0 ms 0 KB -