답안 #729406

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
729406 2023-04-24T03:37:45 Z scanhex Shortcut (IOI16_shortcut) C++17
컴파일 오류
0 ms 0 KB
#include <algorithm>
#include <iostream>
#include <vector>
#include <numeric>
#include "shortcut.h"

using namespace std;
typedef long long nagai;

vector<vector<int>> stmin, stmax;
vector<int> mpow;

void initst(int n, vector<int> val)
{
	stmin.assign(20, vector<int>(n));
	stmax = stmin;
	mpow.resize(n);
	for (int i = 2; i <= n; ++i)
		mpow[i] = mpow[i >> 1] + 1;
	stmin[0] = stmax[0] = val;
	for (int i = 0; i < 19; ++i)
		for (int j = 0; j < n; ++j)
		{
			stmin[i + 1][j] = min(stmin[i][j], stmin[i][min(n - 1, j + (1 << i))]);
			stmax[i + 1][j] = max(stmax[i][j], stmax[i][min(n - 1, j + (1 << i))]);
		}
}

nagai qmin(int i, int j)
{
	int p = mpow[j - i];
	return min(stmin[p][i], stmin[p][j - (1 << p)]);
}

nagai qmax(int i, int j)
{
	int p = mpow[j - i];
	return max(stmax[p][i], stmax[p][j - (1 << p)]);
}

long long find_shortcut(int n, std::vector<int> l, std::vector<int> d1, int c)
{
	vector<nagai> d(n);
	for (int i = 0; i < n; ++i)
		d[i] = d1[i];
	vector<nagai> pref(n);
	for (int i = 0; i < n - 1; ++i)
		pref[i + 1] = pref[i] + l[i];
	nagai mx = 0;
	for (int i = 0; i < n; ++i)
		for (int j = i + 1; j < n; ++j)
			mx = max(mx, pref[j] - pref[i] + d[i] + d[j]);
	int ib = 0, ie = n - 1;
	for (int i = 0; i < n; ++i)
		for (int j = i + 1; j < n; ++j)
			if (mx == pref[j] - pref[i] + d[i] + d[j])
				ib = max(ib, i), ie = min(ie, j);
	vector<nagai> prefd(n);
	for (int i = 0; i < n; ++i)
		for (int j = 0; j < i; ++j)
			prefd[i] = max(prefd[i], pref[i] - pref[j] + d[j]);
	vector<nagai> suffd(n);
	for (int i = 0; i < n; ++i)
		for (int j = i + 1; j < n; ++j)
			suffd[i] = max(suffd[i], pref[j] - pref[i] + d[j]);
	auto dist = [&](int i, int j, int a, int b)
	{
		if (b < a)
			return pref[b] - pref[i] + pref[j] - pref[a] + c;
		return pref[b] - pref[a];
	};
	auto check = [&](int i, int j)
	{
		int p2 = i;
		nagai curd = 0;
		nagai alldst = pref[j] - pref[i] + c;
		nagai diam1 = 0;
		for (int k = i; k <= j; ++k)
		{
			while (p2 < j && curd + l[p2] <= alldst - curd - l[p2])
				curd += l[p2++];
			if (p2 == j && curd + c <= alldst - curd - c)
				curd += c, p2 = i;
			while (p2 < j && curd + l[p2] <= alldst - curd - l[p2])
				curd += l[p2++];
			nagai nxtl = p2 == j ? c : l[p2];
			nagai nxtp2 = p2 == j ? i : p2 + 1;
			diam1 = max(diam1, qmax(i, nxtp2) - pref[i] + pref[j] - pref[k] + c);
			diam1 = max(diam1, qmin(k + 1, j + 1) - 
					qmax(i, nxtp2)
			for (int l = k + 1; l != nxtp2; l = l == j ? i : l + 1)
				diam1 = max(diam1, dist(i, j, k, l) + d[k] + d[l]);
			for (int l = nxtp2; l != k; l = l == j ? i : l + 1)
				diam1 = max(diam1, dist(i, j, l, k) + d[k] + d[l]);
//			cout << k << ' ' << diam1 << ' ' << p2 << endl;
			curd -= l[k];
		}
		nagai diam2 = 0;
		for (int k = i; k <= j; ++k)
		{
			diam2 = max(diam2, min(pref[j] - pref[k] + suffd[j] + d[k], c + pref[k] - pref[i] + d[k] + suffd[j]));
		}
		return make_pair(diam1, diam2);
	};
	nagai ans = mx;
	for (int i = ib; i < ie; ++i)
	{
		int di1 = d[i];
		d[i] = max((nagai)d[i], prefd[i]);
		int L = i + 1, R = ie;
		while (R - L > 1)
		{
			int j = (L + R) / 2;
			auto p = check(i, j);
			nagai diam1 = p.first;
			nagai diam2 = p.second;
			if (diam1 < diam2)
				L = j;
			else
				R = j;
//			cout << i << ' ' << j << ' ' << diam << ' ' << ans << endl;
		}
		auto p = check(i, L);
//		cout << i << ' ' << L << ' ' << p.first << ' ' << p.second << endl;
		ans = min(ans, max(p.first, p.second));
		p = check(i, R);
//		cout << R << ' ' << p.first << ' ' << p.second << endl;
		ans = min(ans, max(p.first, p.second));
		d[i] = di1;
	}
	return ans;
}

Compilation message

shortcut.cpp: In lambda function:
shortcut.cpp:90:20: error: expected ')' before 'for'
   90 |      qmax(i, nxtp2)
      |                    ^
      |                    )
   91 |    for (int l = k + 1; l != nxtp2; l = l == j ? i : l + 1)
      |    ~~~              
shortcut.cpp:89:15: note: to match this '('
   89 |    diam1 = max(diam1, qmin(k + 1, j + 1) -
      |               ^
shortcut.cpp:91:26: error: no match for 'operator!=' (operand types are 'std::vector<int>' and 'nagai' {aka 'long long int'})
   91 |    for (int l = k + 1; l != nxtp2; l = l == j ? i : l + 1)
      |                        ~ ^~ ~~~~~
      |                        |    |
      |                        |    nagai {aka long long int}
      |                        std::vector<int>
In file included from /usr/include/c++/10/utility:70,
                 from /usr/include/c++/10/algorithm:60,
                 from shortcut.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:
shortcut.cpp:91:29: note:   'std::vector<int>' is not derived from 'const std::pair<_T1, _T2>'
   91 |    for (int l = k + 1; l != nxtp2; l = l == j ? i : l + 1)
      |                             ^~~~~
In file included from /usr/include/c++/10/bits/stl_algobase.h:67,
                 from /usr/include/c++/10/algorithm:61,
                 from shortcut.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:
shortcut.cpp:91:29: note:   'std::vector<int>' is not derived from 'const std::reverse_iterator<_Iterator>'
   91 |    for (int l = k + 1; l != nxtp2; l = l == j ? i : l + 1)
      |                             ^~~~~
In file included from /usr/include/c++/10/bits/stl_algobase.h:67,
                 from /usr/include/c++/10/algorithm:61,
                 from shortcut.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:
shortcut.cpp:91:29: note:   'std::vector<int>' is not derived from 'const std::reverse_iterator<_Iterator>'
   91 |    for (int l = k + 1; l != nxtp2; l = l == j ? i : l + 1)
      |                             ^~~~~
In file included from /usr/include/c++/10/bits/stl_algobase.h:67,
                 from /usr/include/c++/10/algorithm:61,
                 from shortcut.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:
shortcut.cpp:91:29: note:   'std::vector<int>' is not derived from 'const std::move_iterator<_IteratorL>'
   91 |    for (int l = k + 1; l != nxtp2; l = l == j ? i : l + 1)
      |                             ^~~~~
In file included from /usr/include/c++/10/bits/stl_algobase.h:67,
                 from /usr/include/c++/10/algorithm:61,
                 from shortcut.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:
shortcut.cpp:91:29: note:   'std::vector<int>' is not derived from 'const std::move_iterator<_IteratorL>'
   91 |    for (int l = k + 1; l != nxtp2; l = l == j ? i : l + 1)
      |                             ^~~~~
In file included from /usr/include/c++/10/tuple:39,
                 from /usr/include/c++/10/functional:54,
                 from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
                 from /usr/include/c++/10/algorithm:74,
                 from shortcut.cpp:1:
/usr/include/c++/10/array:278:5: note: candidate: 'template<class _Tp, long unsigned int _Nm> bool std::operator!=(const std::array<_Tp, _Nm>&, const std::array<_Tp, _Nm>&)'
  278 |     operator!=(const array<_Tp, _Nm>& __one, const array<_Tp, _Nm>& __two)
      |     ^~~~~~~~
/usr/include/c++/10/array:278:5: note:   template argument deduction/substitution failed:
shortcut.cpp:91:29: note:   'std::vector<int>' is not derived from 'const std::array<_Tp, _Nm>'
   91 |    for (int l = k + 1; l != nxtp2; l = l == j ? i : l + 1)
      |                             ^~~~~
In file included from /usr/include/c++/10/functional:54,
                 from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
                 from /usr/include/c++/10/algorithm:74,
                 from shortcut.cpp:1:
/usr/include/c++/10/tuple:1448:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator!=(const std::tuple<_Tps ...>&, const std::tuple<_UTypes ...>&)'
 1448 |     operator!=(const tuple<_TElements...>& __t,
      |     ^~~~~~~~
/usr/include/c++/10/tuple:1448:5: note:   template argument deduction/substitution failed:
shortcut.cpp:91:29: note:   'std::vector<int>' is not derived from 'const std::tuple<_Tps ...>'
   91 |    for (int l = k + 1; l != nxtp2; l = l == j ? i : l + 1)
      |                             ^~~~~
In file included from /usr/include/c++/10/functional:59,
                 from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
                 from /usr/include/c++/10/algorithm:74,
                 from shortcut.cpp:1:
/usr/include/c++/10/bits/std_function.h:699:5: note: candidate: 'template<class _Res, class ... _Args> bool std::operator!=(const std::function<_Res(_ArgTypes ...)>&, std::nullptr_t)'
  699 |     operator!=(const function<_Res(_Args...)>& __f, nullptr_t) noexcept
      |     ^~~~~~~~
/usr/include/c++/10/bits/std_function.h:699:5: note:   template argument deduction/substitution failed:
shortcut.cpp:91:29: note:   'std::vector<int>' is not derived from 'const std::function<_Res(_ArgTypes ...)>'
   91 |    for (int l = k + 1; l != nxtp2; l = l == j ? i : l + 1)
      |                             ^~~~~
In file included from /usr/include/c++/10/functional:59,
                 from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
                 from /usr/include/c++/10/algorithm:74,
                 from shortcut.cpp:1:
/usr/include/c++/10/bits/std_function.h:705:5: note: candidate: 'template<class _Res, class ... _Args> bool std::operator!=(std::nullptr_t, const std::function<_Res(_ArgTypes ...)>&)'
  705 |     operator!=(nullptr_t, const function<_Res(_Args...)>& __f) noexcept
      |     ^~~~~~~~
/usr/include/c++/10/bits/std_function.h:705:5: note:   template argument deduction/substitution failed:
shortcut.cpp:91:29: note:   mismatched types 'const std::function<_Res(_ArgTypes ...)>' and 'nagai' {aka 'long long int'}
   91 |    for (int l = k + 1; l != nxtp2; l = l == j ? i : l + 1)
      |                             ^~~~~
In file included from /usr/include/c++/10/unordered_map:40,
                 from /usr/include/c++/10/functional:61,
                 from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
                 from /usr/include/c++/10/algorithm:74,
                 from shortcut.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:
shortcut.cpp:91:29: note:   'std::vector<int>' is not derived from 'const std::allocator<_Tp1>'
   91 |    for (int l = k + 1; l != nxtp2; l = l == j ? i : l + 1)
      |                             ^~~~~
In file included from /usr/include/c++/10/bits/node_handle.h:39,
                 from /usr/include/c++/10/bits/hashtable.h:37,
                 from /usr/include/c++/10/unordered_map:46,
                 from /usr/include/c++/10/functional:61,
                 from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
                 from /usr/include/c++/10/algorithm:74,
                 from shortcut.cpp:1:
/usr/include/c++/10/optional:994:5: note: candidate: 'template<class _Tp, class _Up> constexpr std::__optional_relop_t<decltype ((declval<_Tp>() != declval<_Up>()))> std::operator!=(const std::optional<_Tp>&, const std::optional<_Up>&)'
  994 |     operator!=(const optional<_Tp>& __lhs, const optional<_Up>& __rhs)
      |     ^~~~~~~~
/usr/include/c++/10/optional:994:5: note:   template argument deduction/substitution failed:
shortcut.cpp:91:29: note:   'std::vector<int>' is not derived from 'const std::optional<_Tp>'
   91 |    for (int l = k + 1; l != nxtp2; l = l == j ? i : l + 1)
      |                             ^~~~~
In file included from /usr/include/c++/10/bits/node_handle.h:39,
                 from /usr/include/c++/10/bits/hashtable.h:37,
                 from /usr/include/c++/10/unordered_map:46,
                 from /usr/include/c++/10/functional:61,
                 from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
                 from /usr/include/c++/10/algorithm:74,
                 from shortcut.cpp:1:
/usr/include/c++/10/optional:1061:5: note: candidate: 'template<class _Tp> constexpr bool std::operator!=(const std::optional<_Tp>&, std::nullopt_t)'
 1061 |     operator!=(const optional<_Tp>& __lhs, nullopt_t) noexcept
      |     ^~~~~~~~
/usr/include/c++/10/optional:1061:5: note:   template argument deduction/substitution failed:
shortcut.cpp:91:29: note:   'std::vector<int>' is not derived from 'const std::optional<_Tp>'
   91 |    for (int l = k + 1; l != nxtp2; l = l == j ? i : l + 1)
      |                             ^~~~~
In file included from /usr/include/c++/10/bits/node_handle.h:39,
                 from /usr/include/c++/10/bits/hashtable.h:37,
                 from /usr/include/c++/10/unordered_map:46,
                 from /usr/include/c++/10/functional:61,
                 from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
                 from /usr/include/c++/10/algorithm:74,
                 from shortcut.cpp:1:
/usr/include/c++/10/optional:1066:5: note: candidate: 'template<class _Tp> constexpr bool std::operator!=(std::nullopt_t, const std::optional<_Tp>&)'
 1066 |     operator!=(nullopt_t, const optional<_Tp>& __rhs) noexcept
      |     ^~~~~~~~
/usr/include/c++/10/optional:1066:5: note:   template argument deduction/substitution failed:
shortcut.cpp:91:29: note:   mismatched types 'const std::optional<_Tp>' and 'nagai' {aka 'long long int'}
   91 |    for (int l = k + 1; l != nxtp2; l = l == j ? i : l + 1)
      |                             ^~~~~
In file included from /usr/include/c++/10/bits/node_handle.h:39,
                 from /usr/include/c++/10/bits/hashtable.h:37,
                 from /usr/include/c++/10/unordered_map:46,
                 from /usr/include/c++/10/functional:61,
                 from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
                 from /usr/include/c++/10/algorithm:74,
                 from shortcut.cpp:1:
/usr/include/c++/10/optional:1125:5: note: candidate: 'template<class _Tp, class _Up> constexpr std::__optional_relop_t<decltype ((declval<_Tp>() != declval<_Up>()))> std::operator!=(const std::optional<_Tp>&, const _Up&)'
 1125 |     operator!=(const optional<_Tp>& __lhs, const _Up& __rhs)
      |     ^~~~~~~~
/usr/include/c++/10/optional:1125:5: note:   template argument deduction/substitution failed:
shortcut.cpp:91:29: note:   'std::vector<int>' is not derived from 'const std::optional<_Tp>'
   91 |    for (int l = k + 1; l != nxtp2; l = l == j ? i : l + 1)
      |                             ^~~~~
In file included from /usr/include/c++/10/bits/node_handle.h:39,
                 from /usr/include/c++/10/bits/hashtable.h:37,
                 from /usr/include/c++/10/unordered_map:46,
                 from /usr/include/c++/10/functional:61,
                 from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
                 from /usr/include/c++/10/algorithm:74,
                 from shortcut.cpp:1:
/usr/include/c++/10/optional:1131:5: note: candidate: 'template<class _Tp, class _Up> constexpr std::__optional_relop_t<decltype ((declval<_Up>() != declval<_Tp>()))> std::operator!=(const _Up&, const std::optional<_Tp>&)'
 1131 |     operator!=(const _Up& __lhs, const optional<_Tp>& __rhs)
      |     ^~~~~~~~
/usr/include/c++/10/optional:1131:5: note:   template argument deduction/substitution failed:
shortcut.cpp:91:29: note:   mismatched types 'const std::optional<_Tp>' and 'nagai' {aka 'long long int'}
   91 |    for (int l = k + 1; l != nxtp2; l = l == j ? i : l + 1)
      |                             ^~~~~
In file included from /usr/include/c++/10/unordered_map:47,
                 from /usr/include/c++/10/functional:61,
                 from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
                 from /usr/include/c++/10/algorithm:74,
                 from shortcut.cpp:1:
/usr/include/c++/10/bits/unordered_map.h:2097:5: note: candidate: 'template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc> bool std::operator!=(const std::unordered_map<_Key1, _Tp1, _Hash1, _Pred1, _Alloc1>&, const std::unordered_map<_Key1, _Tp1, _Hash1, _Pred1, _Alloc1>&)'
 2097 |     operator!=(const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
      |     ^~~~~~~~
/usr/include/c++/10/bits/unordered_map.h:2097:5: note:   template argument deduction/substitution failed:
shortcut.cpp:91:29: note:   'std::vector<int>' is not derived from 'const std::unordered_map<_Key1, _Tp1, _Hash1, _Pred1, _Alloc1>'
   91 |    for (int l = k + 1; l != nxtp2; l = l == j ? i : l + 1)
      |                             ^~~~~
In file included from /usr/include/c++/10/unordered_map:47,
                 from /usr/include/c++/10/functional:61,
                 from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
                 from /usr/include/c++/10/algorithm:74,
                 from shortcut.cpp:1:
/usr/include/c++/10/bits/unordered_map.h:2111:5: note: candidate: 'template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc> bool std::operator!=(const std::unordered_multimap<_Key1, _Tp1, _Hash1, _Pred1, _Alloc1>&, const std::unordered_multimap<_Key1, _Tp1, _Hash1, _Pred1, _Alloc1>&)'
 2111 |     operator!=(const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
      |     ^~~~~~~~
/usr/include/c++/10/bits/unordered_map.h:2111:5: note:   template argument deduction/substitution failed:
shortcut.cpp:91:29: note:   'std::vector<int>' is not derived from 'const std::unordered_multimap<_Key1, _Tp1, _Hash1, _Pred1, _Alloc1>'
   91 |    for (int l = k + 1; l != nxtp2; l = l == j ? i : l + 1)
      |                             ^~~~~
In file included from /usr/include/c++/10/vector:67,
                 from /usr/include/c++/10/functional:62,
                 from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
                 from /usr/include/c++/10/algorithm:74,
                 from shortcut.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:
shortcut.cpp:91:29: note:   mismatched types 'const std::vector<_Tp, _Alloc>' and 'nagai' {aka 'long long int'}
   91 |    for (int l = k + 1; l != nxtp2; l = l == j ? i : l + 1)
      |                             ^~~~~
In file included from /usr/include/c++/10/iosfwd:40,
                 from /usr/include/c++/10/ios:38,
                 from /usr/include/c++/10/ostream:38,
                 from /usr/include/c++/10/iostream:39,
                 from shortcut.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:
shortcut.cpp:91:29: note:   'std::vector<int>' is not derived from 'const std::fpos<_StateT>'
   91 |    for (int l = k + 1; l != nxtp2; l = l == j ? i : l + 1)
      |                             ^~~~~
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/ostream:38,
                 from /usr/include/c++/10/iostream:39,
                 from shortcut.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:
shortcut.cpp:91:29: note:   'std::vector<int>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
   91 |    for (int l = k + 1; l != nxtp2; l = l == j ? i : l + 1)
      |                             ^~~~~
In file included from /usr/include/c++/10/bits/basic_string.h:48,
                 from /usr/include/c++/10/string:55,
                 from