Submission #1008302

# Submission time Handle Problem Language Result Execution time Memory
1008302 2024-06-26T09:04:00 Z IBory Ancient Machine (JOI21_ancient_machine) C++17
Compilation error
0 ms 0 KB
#include "ancient_machine.h"
#include <bits/stdc++.h>
using namespace std;

void Anna(int N, vector<char> S) {
	int x = 0, y = 0, z = 0;
	vector<int> go(N);
	for (int i = 0; i < N; ++i) {
		if (!x) {
			if (S[i] == 'X') x = i;
		}
		else if (!y) {
			if (S[i] == 'X') x = i;
			if (S[i] == 'Y') y = i;
		}
		else if (!z) {
			if (S[i] == 'Z') {
				go[x] = go[y] = go[i] = 1;
				x = 0, y = 0, z = 0;
			}
		}
	}
	for (int n : go) Send(n);
}
#include "ancient_machine.h"
#include <bits/stdc++.h>
using namespace std;

void Bruno(int N, int L, vector<int> A) {
	vector<int> P;
	for (int i = 0; i < A.size(); ++i) {
		if (A[i]) P.push_back(i);
		else Remove(i);
	}
	for (int i = 1; i < P.size(); i += 3) Remove(P[i]);
	for (int i = 0; i < P.size(); ++i) if (i % 3 != 1) Remove(P[i]);
}

Compilation message

Anna.cpp:1:10: fatal error: ancient_machine.h: No such file or directory
    1 | #include "ancient_machine.h"
      |          ^~~~~~~~~~~~~~~~~~~
compilation terminated.

Bruno.cpp:1:10: fatal error: ancient_machine.h: No such file or directory
    1 | #include "ancient_machine.h"
      |          ^~~~~~~~~~~~~~~~~~~
compilation terminated.