Submission #1158060

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
11580602025-02-26 14:19:48MrDogMeatMechanical Doll (IOI18_doll)C++20
2 / 100
12 ms2372 KiB
#include<bits/stdc++.h>
using namespace std;
const int MAXM = 1e5 + 5;
void answer(std::vector<int> C, std::vector<int> X, std::vector<int> Y);
bool checked[MAXM];
void create_circuit(int M, std::vector<int> A) {
vector<int> AnsC, AnsX, AnsY;
AnsC.resize(M + 1);
AnsC[0] = A[0];
for(int iA = 0; iA < A.size() - 1; iA++) {
int cur_trigger = A[iA];
int next_trigger = A[iA + 1];
AnsC[cur_trigger] = next_trigger;
checked[cur_trigger] = true;
}
for(int trigger = 1; trigger <= M; trigger++) {
if(!checked[trigger]) {
AnsC[trigger] = 0;
}
}
answer(AnsC, AnsX, AnsY);
};
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...