Language: C++

#include "bits/stdc++.h"
using namespace std;

//#define int int64_t

#define CHOOSE(a) CHOOSE2 a
#define CHOOSE2(a0,a1,a2,a3,x,...) x
#define REP1(i, s, cond, cal) for (signed i = signed(s); i cond; i cal)
#define REP2(i, s, n) REP1(i, s, < signed(n), ++)
#define REP3(i, n) REP2(i, 0, n)
#define rep(...) CHOOSE((__VA_ARGS__,REP1,REP2,REP3))(__VA_ARGS__)

#define all(c) begin(c), end(c)
#define maxup(ans, x) (ans = (ans < x ? x : ans))
#define minup(ans, x) (ans = (ans > x ? x : ans))

#define breakif(cond) if(cond) break; else

template<typename T>
inline void input(vector<T>& v) { for (auto& x : v) cin >> x; }

using VV = vector<vector<int>>;
using V = vector<int>;
//using P = pair<int, int>;
//using IP = pair<int, P>;

using P = complex<double>;
using L = vector<P>;
bool operator < (const P& a, const P& b) {
	return real(a) != real(b) ? real(a) < real(b) : imag(a) < imag(b);
}
P rs[] = { P(1, 0), P(0, 1), P(-1, 0), P(0, -1) };
L rotate(L line, int idx) {
	L ret = line;
	for (auto& x : ret) {
		x *= rs[idx];
	}
	return ret;
};
L move(L line) {
	P sub = *min_element(all(line));
	L ret = line;
	for (auto& x : ret) {
		x -= sub;
	}
	return ret;
};
L input(){
	int m; cin >> m;
	L l(m);
	rep(i, m) {
		int x, y; cin >> x >> y;
		l[i] = P(y, x);
	}
	return l;
};
bool equal(L& l1, L& l2) {
	L l22 = l2;
	reverse(all(l22));
	rep(i, 4) {
		if (move(l1) == move(rotate(l2, i)) || move(l1) == move(rotate(l22, i))) return true;
	}
	return false;
};
signed main() {
	int n;
	while (cin >> n && n) {
		vector<L> lines(n - 1);
		L line;
		
		line = input();
		stringstream ss;
		rep(i, n) {
			if (equal(line, move(input()))) {
				ss << i + 1 << endl;
			}
		}
		ss << "+++++" << endl;
		cout << ss.str();
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:74:34: error: no matching function for call to 'equal(L&, L)'
   74 |                         if (equal(line, move(input()))) {
      |                             ~~~~~^~~~~~~~~~~~~~~~~~~~~
a.cc:57:6: note: candidate: 'bool equal(L&, L&)' (near match)
   57 | bool equal(L& l1, L& l2) {
      |      ^~~~~
a.cc:57:6: note:   conversion of argument 2 would be ill-formed:
a.cc:74:45: error: cannot bind non-const lvalue reference of type 'L&' {aka 'std::vector<std::complex<double> >&'} to an rvalue of type 'L' {aka 'std::vector<std::complex<double> >'}
   74 |                         if (equal(line, move(input()))) {
      |                                         ~~~~^~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:1582:5: note: candidate: 'template<class _II1, class _II2> bool std::equal(_II1, _II1, _II2)'
 1582 |     equal(_II1 __first1, _II1 __last1, _II2 __first2)
      |     ^~~~~
/usr/include/c++/14/bits/stl_algobase.h:1582:5: note:   candidate expects 3 arguments, 2 provided
/usr/include/c++/14/bits/stl_algobase.h:1613:5: note: candidate: 'template<class _IIter1, class _IIter2, class _BinaryPredicate> bool std::equal(_IIter1, _IIter1, _IIter2, _BinaryPredicate)'
 1613 |     equal(_IIter1 __first1, _IIter1 __last1,
      |     ^~~~~
/usr/include/c++/14/bits/stl_algobase.h:1613:5: note:   candidate expects 4 arguments, 2 provided
/usr/include/c++/14/bits/stl_algobase.h:1704:5: note: candidate: 'template<class _II1, class _II2> bool std::equal(_II1, _II1, _II2, _II2)'
 1704 |     equal(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2)
      |     ^~~~~
/usr/include/c++/14/bits/stl_algobase.h:1704:5: note:   candidate expects 4 arguments, 2 provided
/usr/include/c++/14/bits/stl_algobase.h:1737:5: note: candidate: 'template<class _IIter1, class _IIter2, class _BinaryPredicate> bool std::equal(_IIter1, _IIter1, _IIter2, _IIter2, _BinaryPredicate)'
 1737 |     equal(_IIter1 __first1, _IIter1 __last1,
      |     ^~~~~
/usr/include/c++/14/bits/stl_algobase.h:1737:5: note:   candidate expects 5 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:86:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:333:1: note: candidate: 'template<class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> std::equal(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _BinaryPredicate)'
  333 | equal(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2,
      | ^~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:333:1: note:   candidate expects 5 arguments, 2 provided
/usr/include/c++/14/pstl/glue_algorithm_defs.h:338:1: note: candidate: 'template<class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> std::equal(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2)'
  338 | equal(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2);
      | ^~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:338:1: note:   candidate expects 4 arguments, 2 provided
/usr/include/c++/14/pstl/glue_algorithm_defs.h:342:1: note: candidate: 'template<class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> std::equal(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2, _BinaryPredicate)'
  342 | equal(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2,
      | ^~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:342:1: note:   candidate expects 6 arguments, 2 provided
/usr/include/c++/14/pstl/glue_algorithm_defs.h:347:1: note: candidate: 'template<class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> std::equal(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2)'
  347 | equal(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2,
      | ^~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:347:1: note:   candidate expects 5 arguments, 2 provided
In file included from /usr/include/c++/14/bits/stl_algobase.h:71:
/usr/include/c++/14/bits/predefined_ops.h: In instantiation of 'constexpr bool __gnu_cxx::__ops::_Iter_less_iter::operator()(_Iterator1, _Iterator2) const [with _Iterator1 = __gnu_cxx::__normal_iterator<std::complex<double>*, std::vector<std::complex<double> > >; _Iterator2 = __gnu_cxx::__normal_iterator<std::complex<double>*, std::vector<std::complex<double> > >]':
/usr/include/c++/14/bits/stl_algo.h:5562:12:   required from 'constexpr _ForwardIterator std::__min_element(_ForwardIterator, _ForwardIterator, _Compare) [with _ForwardIterator = __gnu_cxx::__normal_iterator<complex<double>*, vector<complex<double> > >; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
 5562 |         if (__comp(__first, __result))
      |             ~~~~~~^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:5586:43:   required from 'constexpr _FIter std::min_element(_FIter, _FIter) [with _FIter = __gnu_cxx::__normal_iterator<complex<double>*, vector<complex<double> > >]'
 5586 |       return _GLIBCXX_STD_A::__min_element(__first, __last,
      |                                           ^
a.cc:41:22:   required from here
   41 |         P sub = *min_element(all(line));
      |                  ~~~~~~~~~~~^~~~~~~~~~~
/usr/include/c++/14/bits/predefined_ops.h:45:23: error: no match for 'operator<' (operand types are 'std::complex<double>' and 'std::complex<double>')
   45 |       { return *__it1 < *__it2; }
      |                ~~~~~~~^~~~~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:67:
/usr/include/c++/14/bits/stl_iterator.h:1241:5: note: candidate: 'template<class _IteratorL, class _IteratorR, class _Container> bool __gnu_cxx::operator<(const __normal_iterator<_IteratorL, _Container>&, const __normal_iterator<_IteratorR, _Container>&)'
 1241 |     operator<(const __normal_iterator<_IteratorL, _Container>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1241:5: note:   template argument deduction/substitution failed:
/usr/include/c++/14/bits/predefined_ops.h:45:23: note:   'std::complex<double>' is not derived from 'const __gnu_cxx::__normal_iterator<_IteratorL, _Container>'
   45 |       { return *__it1 < *__it2; }
      |                ~~~~~~~^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1249:5: note: candidate: 'template<class _Iterator, class _Container> bool __gnu_cxx::operator<(const __normal_iterator<_Iterator, _Container>&, const __normal_iterator<_Iterator, _Container>&)'
 1249 |     operator<(const __normal_iterator<_Iterator, _Container>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1249:5: note:   template argument deduction/substitution failed:
/usr/include/c++/14/bits/predefined_ops.h:45:23: note:   'std::complex<double>' is not derived from 'const __gnu_cxx::__normal_iterator<_Iterator, _Container>'
   45 |       { return *__it1 < *__it2; }
      |                ~~~~~~~^~~~~~~~
In file included from /usr/include/c++/14/regex:68,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181:
/usr/include/c++/14/bits/regex.h:1143:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const sub_match<_BiIter>&)'
 1143 |     operator<(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs)
      |     ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1143:5: note:   template argument deduction/substitution failed:
/usr/include/c++/14/bits/predefined_ops.h:45:23: note:   'std::complex<double>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
   45 |       { return *__it1 < *__it2; }
      |                ~~~~~~~^~~~~~~~
/usr/include/c++/14/bits/regex.h:1224:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator<(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)'
 1224 |     operator<(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1224:5: note:   template argument deduction/substitution failed:
/usr/include/c++/14/bits/predefined_ops.h:45:23: note:   'std::complex<double>' is not derived from 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>'
   45 |       { return *__it1 < *__it2; }
      |                ~~~~~~~^~~~~~~~
/usr/include/c++/14/bits/regex.h:1317:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator<(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)'
 1317 |     operator<(const sub_match<_Bi_iter>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1317:5: note:   template argument deduction/substitution failed:
/usr/include/c++/14/bits/predefined_ops.h:45:23: note:   'std::complex<double>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
   45 |       { return *__it1 < *__it2; }
      |                ~~~~~~~^~~~~~~~
/usr/include/c++/14/bits/regex.h:1391:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)'
 1391 |     operator<(typename iterator_traits<_Bi_iter>::value_type const* __lhs,
      |     ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1391:5: note:   template argument deduction/substitution failed:
/usr/include/c++/14/bits/predefined_ops.h:45:23: note:   'std::complex<double>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
   45 |       { return *__it1