답안 #835848

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
835848 2023-08-23T21:13:15 Z APROHACK 디지털 회로 (IOI22_circuit) C++17
컴파일 오류
0 ms 0 KB
#include "circuit.h"
#include <bits/stdc++.h>
#define ll long long
#define ff first
#define ss second
#define pb push_back
using namespace std;
int n, m;
vector<int>child[200001];
bool state[200001];
ll encen[200001][2]; // encendido y apagado
const ll MOD = 1000002022;
ll past[2002][2002];
void generate(int node);
int parent[200002];
bool casito = true;
ll aporte[200002];
ll prefix[200002];
ll T[200002];
ll ans = 0;

#define isCase4 false  


// seg tree

ll sumaUno[200005*4];
ll sumaCero[200005*4];
bool lazy[200005*4];
ll aux1[200005];
ll aux0[200005];
int mid[200005*4];
void upd(int node);
void cambiar(int node, int dd, int ht, int l, int r);
void generate(int node, int dd, int ht){
	mid[node] = (dd + ht)/2;
	if(dd == ht){
		sumaUno[node] = aux1[dd];
		sumaCero[node] = aux0[dd];
	}else{
		generate(node*2, dd, mid[node]);
		generate(node * 2 + 1, mid[node] + 1, ht );
		upd(node);
	}
}
ll get1(int node){
	if(lazy[node]){
		return sumaCero[node];
	}else return sumaUno[node];
}
ll get0(int node){
	if(lazy[node]){
		return sumaUno[node];
	}else return sumaCero[node];
}
void upd(int node){
	sumaUno[node] = (get1(node*2) + get1(node*2+1))%MOD;
	sumaCero[node] = (get0(node*2) + get0(node*2+1))%MOD;
}
void prop(int node, int dd, int ht){
	if(lazy[node] ){
		//cout << "propagating from " << dd << " " << ht << endl;
		if(dd == ht)swap(sumaCero[node], sumaUno[node]);
		else{
			cambiar(node*2, dd, mid[node], dd, mid[node]);
			cambiar(node*2+1, mid[node] + 1, ht, mid[node] + 1, ht);
		}
	}
}
void cambiar(int node, int dd, int ht, int l, int r){
	if(dd == l and ht == r){
		lazy[node] = !lazy[node];
		//cout << "node " << dd << " " << ht << " exc " << lazy[node] << endl;
	}
	else{
		prop(node, dd, ht);
		lazy[node] = 0;
		if(r <= mid[node])cambiar(node * 2, dd, mid[node], l, r);
		else if(mid[node] < l)cambiar(node*2+1, mid[node]+1, ht, l, r);
		else{
			cambiar(node*2, dd, mid[node], l, mid[node]);
			cambiar(node*2+1, mid[node]+1, ht, mid[node] + 1, r);
		}
		upd(node);
		//cout << "node " << dd << " " << ht << " updated ";
		//cout << get1(node) << " " << get0(node) << endl;
	}
}


void precalc(int node){
	T[node] = 1;
	if(node >= n)return ;
	for(int i = 0 ; i < child[node].size() ; i ++){
		precalc(child[node][i]);
		T[node]  = T[node] * T[child[node][i]] % MOD;
	}	
	T[node] = T[node] * (ll)child[node].size() % MOD;
}
void calcPrefix(int node, ll acum){
	if(node >= n){
		aporte[node] = acum;	
		//cout << "aporte de " << node << ": " << acum << endl;
		sumaUno[node] = 0;
		sumaCero[node] = 0;
		if(state[node])aux1[node] = aporte[node];
		else aux0[node] = aporte[node];
		return ;
	}
	int hijo1 = child[node][0];
	int hijo2 = child[node][1];
	calcPrefix(hijo1, (acum * T[hijo2]) % MOD);
	calcPrefix(hijo2, (acum * T[hijo1]) % MOD);
}


//
void init(int N, int M, std::vector<int> P, std::vector<int> A) {
	n = N;
	m = M;
	for(int i = 0 ; i < n+m ; i ++){
		if(P[i] != -1){
			child[P[i]].pb(i);
		}
		parent[i] = P[i];
	}
	for(int i = 0 ; i < n+m ; i ++){
		if(child[i] != 0 and child[i] != 2)casito  = false;
	}
	//assert(casito);
	for(int i = N ; i <= N+M ; i ++){
		state[i] = A[i-N];
	}
	memset(past, -1, sizeof past);
	memset(lazy, false, sizeof lazy);
	generate(0);
	ans = encen[0][0];
	if(isCase4  or (  casito and (n > 1000 or m > 1000) ) ){
		precalc(0);
		calcPrefix(0, 1);
		generate(1, n, n+m-1);
	}

	
}

ll mem[2002][2002];
ll currentIt = -1 ;
void newDp(){
	currentIt++;
}
ll dp(int parent, ll i, int k){
	if(k < 0)return 0;
	if(i == child[parent].size() and k > 0)return 0;
	else if(i == child[parent].size()) return 1;
	if(past[i][k] == currentIt)return mem[i][k];
	past[i][k] = currentIt;
	return mem[i][k] = ((dp(parent, i+1, k-1) * encen[child[parent][i]][0] % MOD) + ((dp(parent, i+1, k) * encen[child[parent][i]][1])%MOD))%MOD;
}

void generate(int node){
	if(node >= n){
		if(state[node]){
			encen[node][0] = 1;
			encen[node][1] = 0;
		}else{
			encen[node][0] = 0;
			encen[node][1] = 1;

		}
		return ;
	}
	for(int i = 0 ; i < child[node].size() ; i ++){
		generate(child[node][i]);
	}
	newDp();
	ll enc = 0, inv = 0;
	for(ll i = 1 ; i <= child[node].size() ; i ++){
		enc += dp(node, 0, i) * i % MOD;
		enc %= MOD;
	}
	ll allWays = 1;
	for(int i = 0 ; i < child[node].size() ; i ++){
		allWays *= (encen[child[node][i]][0] + encen[child[node][i]][1])%MOD;
		allWays %= MOD;
	}
	allWays *= (ll)child[node].size();
	allWays %= MOD;
	encen[node][0] = enc;
	encen[node][1] = ((allWays - enc) + MOD) % MOD;
	//cout << "for node " << node << " there are " << encen[node][0] << ", " << encen[node][1] << "\n";
}
	

int count_ways(int L, int R) {
		if(isCase4  or (  casito and (n > 1000 or m > 1000) ) ){
		cambiar(1, n, n+m-1, L, R);
		return get1(1);
	}
	else {
		for(int i = L ; i <= R ; i ++){
			state[i] = !state[i];
		}

		generate(0);

	}
	return encen[0][0];
}


Compilation message

circuit.cpp: In function 'void precalc(int)':
circuit.cpp:94:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   94 |  for(int i = 0 ; i < child[node].size() ; i ++){
      |                  ~~^~~~~~~~~~~~~~~~~~~~
circuit.cpp: In function 'void init(int, int, std::vector<int>, std::vector<int>)':
circuit.cpp:128:15: error: no match for 'operator!=' (operand types are 'std::vector<int>' and 'int')
  128 |   if(child[i] != 0 and child[i] != 2)casito  = false;
      |      ~~~~~~~~ ^~ ~
      |             |    |
      |             |    int
      |             std::vector<int>
In file included from /usr/include/c++/10/regex:62,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:110,
                 from circuit.cpp:2:
/usr/include/c++/10/bits/regex.h:1064:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator!=(const std::__cxx11::sub_match<_BiIter>&, const std::__cxx11::sub_match<_BiIter>&)'
 1064 |     operator!=(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs)
      |     ^~~~~~~~
/usr/include/c++/10/bits/regex.h:1064:5: note:   template argument deduction/substitution failed:
circuit.cpp:128:18: note:   'std::vector<int>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
  128 |   if(child[i] != 0 and child[i] != 2)casito  = false;
      |                  ^
In file included from /usr/include/c++/10/regex:62,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:110,
                 from circuit.cpp:2:
/usr/include/c++/10/bits/regex.h:1144:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator!=(std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const std::__cxx11::sub_match<_BiIter>&)'
 1144 |     operator!=(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/10/bits/regex.h:1144:5: note:   template argument deduction/substitution failed:
circuit.cpp:128:18: note:   'std::vector<int>' is not derived from 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>'
  128 |   if(child[i] != 0 and child[i] != 2)casito  = false;
      |                  ^
In file included from /usr/include/c++/10/regex:62,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:110,
                 from circuit.cpp:2:
/usr/include/c++/10/bits/regex.h:1237:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator!=(const std::__cxx11::sub_match<_BiIter>&, std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)'
 1237 |     operator!=(const sub_match<_Bi_iter>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/10/bits/regex.h:1237:5: note:   template argument deduction/substitution failed:
circuit.cpp:128:18: note:   'std::vector<int>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
  128 |   if(child[i] != 0 and child[i] != 2)casito  = false;
      |                  ^
In file included from /usr/include/c++/10/regex:62,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:110,
                 from circuit.cpp:2:
/usr/include/c++/10/bits/regex.h:1311:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator!=(const typename std::iterator_traits<_Iter>::value_type*, const std::__cxx11::sub_match<_BiIter>&)'
 1311 |     operator!=(typename iterator_traits<_Bi_iter>::value_type const* __lhs,
      |     ^~~~~~~~
/usr/include/c++/10/bits/regex.h:1311:5: note:   template argument deduction/substitution failed:
circuit.cpp:128:18: note:   mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int'
  128 |   if(child[i] != 0 and child[i] != 2)casito  = false;
      |                  ^
In file included from /usr/include/c++/10/regex:62,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:110,
                 from circuit.cpp:2:
/usr/include/c++/10/bits/regex.h:1405:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator!=(const std::__cxx11::sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)'
 1405 |     operator!=(const sub_match<_Bi_iter>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/10/bits/regex.h:1405:5: note:   template argument deduction/substitution failed:
circuit.cpp:128:18: note:   'std::vector<int>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
  128 |   if(child[i] != 0 and child[i] != 2)casito  = false;
      |                  ^
In file included from /usr/include/c++/10/regex:62,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:110,
                 from circuit.cpp:2:
/usr/include/c++/10/bits/regex.h:1479:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator!=(const typename std::iterator_traits<_Iter>::value_type&, const std::__cxx11::sub_match<_BiIter>&)'
 1479 |     operator!=(typename iterator_traits<_Bi_iter>::value_type const& __lhs,
      |     ^~~~~~~~
/usr/include/c++/10/bits/regex.h:1479:5: note:   template argument deduction/substitution failed:
circuit.cpp:128:18: note:   mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int'
  128 |   if(child[i] != 0 and child[i] != 2)casito  = false;
      |                  ^
In file included from /usr/include/c++/10/regex:62,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:110,
                 from circuit.cpp:2:
/usr/include/c++/10/bits/regex.h:1579:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator!=(const std::__cxx11::sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)'
 1579 |     operator!=(const sub_match<_Bi_iter>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/10/bits/regex.h:1579:5: note:   template argument deduction/substitution failed:
circuit.cpp:128:18: note:   'std::vector<int>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
  128 |   if(child[i] != 0 and child[i] != 2)casito  = false;
      |                  ^
In file included from /usr/include/c++/10/regex:62,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:110,
                 from circuit.cpp:2:
/usr/include/c++/10/bits/regex.h:2126:5: note: candidate: 'template<class _Bi_iter, class _Alloc> bool std::__cxx11::operator!=(const std::__cxx11::match_results<_BiIter, _Alloc>&, const std::__cxx11::match_results<_BiIter, _Alloc>&)'
 2126 |     operator!=(const match_results<_Bi_iter, _Alloc>& __m1,
      |     ^~~~~~~~
/usr/include/c++/10/bits/regex.h:2126:5: note:   template argument deduction/substitution failed:
circuit.cpp:128:18: note:   'std::vector<int>' is not derived from 'const std::__cxx11::match_results<_BiIter, _Alloc>'
  128 |   if(child[i] != 0 and child[i] != 2)casito  = false;
      |                  ^
In file included from /usr/include/c++/10/bits/stl_algobase.h:64,
                 from /usr/include/c++/10/vector:60,
                 from circuit.h:1,
                 from circuit.cpp:1:
/usr/include/c++/10/bits/stl_pair.h:496:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator!=(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&)'
  496 |     operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
      |     ^~~~~~~~
/usr/include/c++/10/bits/stl_pair.h:496:5: note:   template argument deduction/substitution failed:
circuit.cpp:128:18: note:   'std::vector<int>' is not derived from 'const std::pair<_T1, _T2>'
  128 |   if(child[i] != 0 and child[i] != 2)casito  = false;
      |                  ^
In file included from /usr/include/c++/10/bits/stl_algobase.h:67,
                 from /usr/include/c++/10/vector:60,
                 from circuit.h:1,
                 from circuit.cpp:1:
/usr/include/c++/10/bits/stl_iterator.h:372:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator!=(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&)'
  372 |     operator!=(const reverse_iterator<_Iterator>& __x,
      |     ^~~~~~~~
/usr/include/c++/10/bits/stl_iterator.h:372:5: note:   template argument deduction/substitution failed:
circuit.cpp:128:18: note:   'std::vector<int>' is not derived from 'const std::reverse_iterator<_Iterator>'
  128 |   if(child[i] != 0 and child[i] != 2)casito  = false;
      |                  ^
In file included from /usr/include/c++/10/bits/stl_algobase.h:67,
                 from /usr/include/c++/10/vector:60,
                 from circuit.h:1,
                 from circuit.cpp:1:
/usr/include/c++/10/bits/stl_iterator.h:410:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator!=(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_IteratorR>&)'
  410 |     operator!=(const reverse_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/10/bits/stl_iterator.h:410:5: note:   template argument deduction/substitution failed:
circuit.cpp:128:18: note:   'std::vector<int>' is not derived from 'const std::reverse_iterator<_Iterator>'
  128 |   if(child[i] != 0 and child[i] != 2)casito  = false;
      |                  ^
In file included from /usr/include/c++/10/bits/stl_algobase.h:67,
                 from /usr/include/c++/10/vector:60,
                 from circuit.h:1,
                 from circuit.cpp:1:
/usr/include/c++/10/bits/stl_iterator.h:1444:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator!=(const std::move_iterator<_IteratorL>&, const std::move_iterator<_IteratorR>&)'
 1444 |     operator!=(const move_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/10/bits/stl_iterator.h:1444:5: note:   template argument deduction/substitution failed:
circuit.cpp:128:18: note:   'std::vector<int>' is not derived from 'const std::move_iterator<_IteratorL>'
  128 |   if(child[i] != 0 and child[i] != 2)casito  = false;
      |                  ^
In file included from /usr/include/c++/10/bits/stl_algobase.h:67,
                 from /usr/include/c++/10/vector:60,
                 from circuit.h:1,
                 from circuit.cpp:1:
/usr/include/c++/10/bits/stl_iterator.h:1501:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator!=(const std::move_iterator<_IteratorL>&, const std::move_iterator<_IteratorL>&)'
 1501 |     operator!=(const move_iterator<_Iterator>& __x,
      |     ^~~~~~~~
/usr/include/c++/10/bits/stl_iterator.h:1501:5: note:   template argument deduction/substitution failed:
circuit.cpp:128:18: note:   'std::vector<int>' is not derived from 'const std::move_iterator<_IteratorL>'
  128 |   if(child[i] != 0 and child[i] != 2)casito  = false;
      |                  ^
In file included from /usr/include/c++/10/vector:64,
                 from circuit.h:1,
                 from circuit.cpp:1:
/usr/include/c++/10/bits/allocator.h:213:5: note: candidate: 'template<class _T1, class _T2> bool std::operator!=(const std::allocator<_Tp1>&, const std::allocator<_T2>&)'
  213 |     operator!=(const allocator<_T1>&, const allocator<_T2>&)
      |     ^~~~~~~~
/usr/include/c++/10/bits/allocator.h:213:5: note:   template argument deduction/substitution failed:
circuit.cpp:128:18: note:   'std::vector<int>' is not derived from 'const std::allocator<_Tp1>'
  128 |   if(child[i] != 0 and child[i] != 2)casito  = false;
      |                  ^
In file included from /usr/include/c++/10/vector:67,
                 from circuit.h:1,
                 from circuit.cpp:1:
/usr/include/c++/10/bits/stl_vector.h:1937:5: note: candidate: 'template<class _Tp, class _Alloc> bool std::operator!=(const std::vector<_Tp, _Alloc>&, const std::vector<_Tp, _Alloc>&)'
 1937 |     operator!=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
      |     ^~~~~~~~
/usr/include/c++/10/bits/stl_vector.h:1937:5: note:   template argument deduction/substitution failed:
circuit.cpp:128:18: note:   mismatched types 'const std::vector<_Tp, _Alloc>' and 'int'
  128 |   if(child[i] != 0 and child[i] != 2)casito  = false;
      |                  ^
In file included from /usr/include/c++/10/iosfwd:40,
                 from /usr/include/c++/10/ios:38,
                 from /usr/include/c++/10/istream:38,
                 from /usr/include/c++/10/sstream:38,
                 from /usr/include/c++/10/complex:45,
                 from /usr/include/c++/10/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
                 from circuit.cpp:2:
/usr/include/c++/10/bits/postypes.h:227:5: note: candidate: 'template<class _StateT> bool std::operator!=(const std::fpos<_StateT>&, const std::fpos<_StateT>&)'
  227 |     operator!=(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs)
      |     ^~~~~~~~
/usr/include/c++/10/bits/postypes.h:227:5: note:   template argument deduction/substitution failed:
circuit.cpp:128:18: note:   'std::vector<int>' is not derived from 'const std::fpos<_StateT>'
  128 |   if(child[i] != 0 and child[i] != 2)casito  = false;
      |                  ^
In file included from /usr/include/c++/10/bits/basic_string.h:48,
                 from /usr/include/c++/10/string:55,
                 from /usr/include/c++/10/bits/locale_classes.h:40,
                 from /usr/include/c++/10/bits/ios_base.h:41,
                 from /usr/include/c++/10/ios:42,
                 from /usr/include/c++/10/istream:38,
                 from /usr/include/c++/10/sstream:38,
                 from /usr/include/c++/10/complex:45,
                 from /usr/include/c++/10/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
                 from circuit.cpp:2:
/usr/include/c++/10/string_view:525:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator!=(std::basic_string_view<_CharT, _Traits>, std::basic_string_view<_CharT, _Traits>)'
  525 |     operator!=(basic_string_view<_CharT, _Traits> __x,
      |     ^~~~~~~~
/usr/include/c++/10/string_view:525:5: note:   template argument deduction/substitution failed:
circuit.cpp:128:18: note:   'std::vector<int>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
  128 |   if(child[i] != 0 and child[i] != 2)casito  = false;
      |                  ^
In file included from /usr/include/c++/10/bits/basic_string.h:48,
                 from /usr/include/c++/10/string:55,
                 from /usr/include/c++/10/bits/locale_classes.h:40,
                 from /usr/include/c++/10/bits/ios_base.h:41,
                 from /usr/include/c++/10/ios:42,
                 from /usr/include/c++/10/istream:38,
                 from /usr/include/c++/10/sstream:38,
                 from /usr/include/c++/10/complex:45,
                 from /usr/include/c++/10/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
                 from circuit.cpp:2:
/usr/include/c++/10/string_view:531:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator!=(std::basic_string_view<_CharT, _Traits>, std::__type_identity_t<std::basic_string_view<_CharT, _Traits> >)'
  531 |     operator!=(basic_string_view<_CharT, _Traits> __x,
      |     ^~~~~~~~
/usr/include/c++/10/string_view:531:5: note:   template argument deduction/substitution failed:
circuit.cpp:128:18: note:   'std::vector<int>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
  128 |   if(child[i] != 0 and child[i] != 2)casito  = false;
      |                  ^
In file included from /usr/include/c++/10/bits/basic_string.h:48,
                 from /usr/include/c++/10/string:55,
                 from /usr/include/c++/10/bits/locale_classes.h:40,
                 from /usr/include/c++/10/bits/ios_base.h:41,
                 from /usr/include/c++/10/ios:42,
                 from /usr/include/c++/10/istream:38,
                 from /usr/include/c++/10/sstream:38,
                 from /usr/include/c++/10/complex:45,
                 from /usr/include/c++/10/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
                 from circuit.cpp:2:
/usr/include/c++/10/string_view:538:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator!=(std::__type_identity_t<std::basic_string_view<_CharT, _Traits> >, std::basic_string_view<_CharT, _Traits>)'
  538 |     operator!=(__type_identity_t<basic_string_view<_CharT, _Traits>> __x,
      |     ^~~~~~~~
/usr/include/c++/10/string_view:538:5: note:   template argument deduction/substitution failed:
circuit.cpp:128:18: note:   mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int'
  128 |   if(child[i] != 0 and child[i] != 2)casito  = false;
      |                  ^
In file included from /usr/include/c++/10/string:55,
                 from /usr/include/c++/10/bits/locale_classes.h:40,
                 from /usr/include/c++/10/bits/ios_base.h:41,
                 from /usr/include/c++/10/ios:42,
                 from /usr/include/c++/10/istream:38,
                 from /usr/include/c++/10/sstream:38,
                 from /usr/include/c++/10/complex:45,
                 from /usr/include/c++/10/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
                 from circuit.cpp:2:
/usr/include/c++/10/bits/basic_string.h:6229:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator!=(const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&, const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
 6229 |     operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/10/bits/basic_string.h:6229:5: note:   template argument deduction/substitution failed:
circuit.cpp:128:18: note:   'std::vector<int>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
  128 |   if(child[i] != 0 and child[i] != 2)casito  = false;
      |                  ^
In file included from /usr/include/c++/10/string:55,
                 from /usr/include/c++/10/bits/locale_classes.h:40,
                 from /usr/include/c++/10/bits/ios_base.h:41,
                 from /usr/include/c++/10/ios:42,
                 from /usr/include/c++/10/istream:38,
                 from /usr/include/c++/10/ss