QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#86900#1212. NavigationxixikeCompile Error//C++14675b2023-03-11 14:36:042023-03-11 14:36:23

Judging History

你现在查看的是最新测评结果

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-03-11 14:36:23]
  • 评测
  • [2023-03-11 14:36:04]
  • 提交

Anna

#include "Annalib.h"
#include <bits/stdc++.h>

using namespace std;

const int N = 1e5 + 10;
vector <int> G[N];

inline void dfs(int x, int fa, int col){
	Flag(x, col);
	for(auto y : G[x])
		if(G[y] != fa) dfs(y, x, col ^ (y > x));
}

inline void Anna(int K, int N, int T, int A[], int B[]){
	for(int i = 0; i <= (N - 2); ++i){
		G[A[i]].push_back(B[i]);
		G[B[i]].push_back(A[i]);
	}
	dfs(T, 0, 0);
}

Bruno

#include "Brunolib.h"
#include <bits/stdc++.h>

using namespace std;

inline void Bruno(int K, int S, int F, int L, int P[], int Q[]){
	for(int i = 0; i < L; ++i)
		if(F == (Q[i] ^ (S > P[i]))){
			Answer(P[i]);
			return;
		}
	Answer(S);
}

详细

Anna.code: In function ‘void dfs(int, int, int)’:
Anna.code:12:25: error: no match for ‘operator!=’ (operand types are ‘std::vector<int>’ and ‘int’)
   12 |                 if(G[y] != fa) dfs(y, x, col ^ (y > x));
      |                    ~~~~ ^~ ~~
      |                       |    |
      |                       |    int
      |                       std::vector<int>
In file included from /usr/include/c++/11/regex:63,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:110,
                 from Anna.code:2:
/usr/include/c++/11/bits/regex.h:1066:5: note: candidate: ‘template<class _BiIter> bool std::__cxx11::operator!=(const std::__cxx11::sub_match<_BiIter>&, const std::__cxx11::sub_match<_BiIter>&)’
 1066 |     operator!=(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs)
      |     ^~~~~~~~
/usr/include/c++/11/bits/regex.h:1066:5: note:   template argument deduction/substitution failed:
Anna.code:12:28: note:   ‘std::vector<int>’ is not derived from ‘const std::__cxx11::sub_match<_BiIter>’
   12 |                 if(G[y] != fa) dfs(y, x, col ^ (y > x));
      |                            ^~
In file included from /usr/include/c++/11/regex:63,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:110,
                 from Anna.code:2:
/usr/include/c++/11/bits/regex.h:1146: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>&)’
 1146 |     operator!=(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/11/bits/regex.h:1146:5: note:   template argument deduction/substitution failed:
Anna.code:12:28: note:   ‘std::vector<int>’ is not derived from ‘std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>’
   12 |                 if(G[y] != fa) dfs(y, x, col ^ (y > x));
      |                            ^~
In file included from /usr/include/c++/11/regex:63,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:110,
                 from Anna.code:2:
/usr/include/c++/11/bits/regex.h:1239: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>&)’
 1239 |     operator!=(const sub_match<_Bi_iter>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/11/bits/regex.h:1239:5: note:   template argument deduction/substitution failed:
Anna.code:12:28: note:   ‘std::vector<int>’ is not derived from ‘const std::__cxx11::sub_match<_BiIter>’
   12 |                 if(G[y] != fa) dfs(y, x, col ^ (y > x));
      |                            ^~
In file included from /usr/include/c++/11/regex:63,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:110,
                 from Anna.code:2:
/usr/include/c++/11/bits/regex.h:1313: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>&)’
 1313 |     operator!=(typename iterator_traits<_Bi_iter>::value_type const* __lhs,
      |     ^~~~~~~~
/usr/include/c++/11/bits/regex.h:1313:5: note:   template argument deduction/substitution failed:
Anna.code:12:28: note:   mismatched types ‘const std::__cxx11::sub_match<_BiIter>’ and ‘int’
   12 |                 if(G[y] != fa) dfs(y, x, col ^ (y > x));
      |                            ^~
In file included from /usr/include/c++/11/regex:63,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:110,
                 from Anna.code:2:
/usr/include/c++/11/bits/regex.h:1407: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*)’
 1407 |     operator!=(const sub_match<_Bi_iter>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/11/bits/regex.h:1407:5: note:   template argument deduction/substitution failed:
Anna.code:12:28: note:   ‘std::vector<int>’ is not derived from ‘const std::__cxx11::sub_match<_BiIter>’
   12 |                 if(G[y] != fa) dfs(y, x, col ^ (y > x));
      |                            ^~
In file included from /usr/include/c++/11/regex:63,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:110,
                 from Anna.code:2:
/usr/include/c++/11/bits/regex.h:1481: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>&)’
 1481 |     operator!=(typename iterator_traits<_Bi_iter>::value_type const& __lhs,
      |     ^~~~~~~~
/usr/include/c++/11/bits/regex.h:1481:5: note:   template argument deduction/substitution failed:
Anna.code:12:28: note:   mismatched types ‘const std:...