Submission #1162763

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
11627632025-03-06 18:04:32vj09743Mechanical Doll (IOI18_doll)C++20
Compilation error
0 ms0 KiB
//
// Created by Viraj Verma on 06/03/2025.
//
#include <iostream>
#include <vector>
#include <unordered_map>
using namespace std;
void answer(vector<int> C, vector<int> X, vector<int> Y);
void create_circuit() {
int M;
int N;
cin>>M>>N;
unordered_map<int, vector<int>> adjacency_list(M);
vector<int> c (M+1);
vector<int> travel_guide;
int place = 0;
for (int i = 0; i<N; i++) {
int destination;
cin>>destination;
adjacency_list[place].push_back(destination);
place = destination;
}
adjacency_list[place].push_back(0);
int switch_namer = -1;
vector<int> X;
vector<int> Y;
for (int i = 0; i <= M; i++) {
vector<int> adjacents = adjacency_list[i];
if (adjacents.size() == 1) {
c[i] = adjacents[0];
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

/usr/bin/ld: /tmp/cc1YEGvp.o: in function `main':
grader.cpp:(.text.startup+0x168): undefined reference to `create_circuit(int, std::vector<int, std::allocator<int> >)'
collect2: error: ld returned 1 exit status