답안 #124613

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
124613 2019-07-03T15:05:54 Z Just_Solve_The_Problem Examination (JOI19_examination) C++11
컴파일 오류
0 ms 0 KB
#include <stdio.h>
#include <vector>
#include <algorithm>
#include <utility>
#include <tuple>
#include <iostream>
#include <memory.h>

using namespace std;

const int N = (int)1e5 + 7;

int n, m;
pair <int, int> ar[N];

struct fen {
	int tree[N];
	fen() {
		memset(tree, 0, sizeof tree);
	}
	void upd(int pos, int val) {
		while (pos < N) {
			tree[pos] += val;
			pos = pos | pos + 1;
		}
	}
	int get(int r) {
		int res = 0;
		while (r >= 0) {
			res += tree[r];
			r = (r & r + 1) - 1;
		}
		return res;
	}
};
fen tr;

struct query {
	int id, tp, pos, x, y, val, z;
	query() {}
	query(int _pos, int _tp, int _x, int _y, int _z, int _val, int _id) {
		pos = _pos;
		tp = _tp;
		x = _x;
		id = _id;
		val = _val;
		z = _z;
		y = _y;
	}
};
vector <query> vec;
int ans[N];
query tp[N];

void make(int l, int r) {
	if (l >= r) return ;
	int mid = (l + r) >> 1;
	for (int i = l; i <= r; i++) {
		if (vec[i].pos <= mid && vec[i].tp == 0) {
			tr.upd(vec[i].y, vec[i].val);
		} else if (vec[i].pos > mid && vec[i].tp == 1) {
			ans[vec[i].id] += vec[i].val * tr.get(vec[i].y);
		}
	}
	for (int i = l; i <= r; i++) {
		if (vec[i].pos <= mid && vec[i].tp == 0) {
			tr.upd(vec[i].y, -vec[i].val);
		}
	}
	int curl = l;
	int curr = mid + 1;
	for (int i = l; i <= r; i++) {
		if (vec[i].pos <= mid) {
			tp[curl++] = vec[i];
		} else {
			tp[curr++] = vec[i];
		}
	}
	for (int i = l; i <= r; i++) {
		vec[i] = tp[i];
	}
	make(l, mid);
	make(mid + 1, r);
}

main() {
	scanf("%d %d", &n, &m);
	vector <int> vecx, vecy, vecz;
	for (int i = 1, x, y; i <= n; i++) {
		scanf("%d %d", &x, &y);
		vecx.push_back(x);
		vecy.push_back(y);
		vecz.push_back(x + y);
		ar[i] = {x, y};
	}
	sort(vecx.begin(), vecx.end());
	vecx.resize(unique(vecx.begin(), vecx.end()) - vecx.begin());
	sort(vecy.begin(), vecy.end());
	vecy.resize(unique(vecy.begin(), vecy.end()) - vecy.begin());
	sort(vecz.begin(), vecz.end());
	vecz.resize(unique(vecz.begin(), vecz.end()) - vecz.begin());
	int cnt = 0;
	for (int i = 1, x, y, z; i <= n; i++) {
		x = lower_bound(vecx.begin(), vecx.end(), ar[i].first) - vecx.begin();
		y = lower_bound(vecy.begin(), vecy.end(), ar[i].second) - vecy.begin();
		z = lower_bound(vecz.begin(), vecz.end(), ar[i].first + ar[i].second) - vecz.begin();
		vec.push_back(query(cnt++, 0, x, y, z, 1, 0));
	}
	
	for (int i = 1, x, y, z; i <= m; i++) {
		scanf("%d %d %d", &x, &y, &z);
		x = lower_bound(vecx.begin(), vecx.end(), x) - vecx.begin();
		y = lower_bound(vecy.begin(), vecy.end(), y) - vecy.begin();
		z = upper_bound(vecz.begin(), vecz.end(), z) - vecz.begin();
		// cout << x << ' ' << y << ' ' << z << endl;
		vec.push_back(query(cnt++, 1, vec.size(), vec.size(), z, 1, i));
		vec.push_back(query(cnt++, 1, x - 1, vec.size(), z, -1, i));
		vec.push_back(query(cnt++, 1, vec.size(), y - 1, z, -1, i));
		vec.push_back(query(cnt++, 1, x - 1, y - 1, z, 1, i));
	}
	sort(vec.begin(), vec.end(), [&](const auto &A, const auto &B) {
		if (A.z == B.z) return A.id < B.id; 
		return A.z > B.z;
	});
	/*
	for (int i = 0; i < vec.size(); i++) {
		cout << vec[i].tp << ' ' << vec[i].x << ' ' << vec[i].y << ' ' << vec[i].z << endl;
	}
	*/
	cnt = 0;
	for (int i = 0; i < vec.size(); i++) {
		vec[i].pos = cnt++;
	}
	sort(vec.begin(), vec.end(), [&](const auto &A, const auto &B) {
		if (A.x == B.x) return A.pos < B.pos;
		return A.x < B.x;
	});
	make(0, vec.size() - 1);
	for (int i = 1; i <= m; i++) {
		printf("%d\n", ans[i]);
	}
}

Compilation message

examination.cpp: In member function 'void fen::upd(int, int)':
examination.cpp:24:20: warning: suggest parentheses around arithmetic in operand of '|' [-Wparentheses]
    pos = pos | pos + 1;
                ~~~~^~~
examination.cpp: In member function 'int fen::get(int)':
examination.cpp:31:15: warning: suggest parentheses around '+' in operand of '&' [-Wparentheses]
    r = (r & r + 1) - 1;
             ~~^~~
examination.cpp: At global scope:
examination.cpp:86:6: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
 main() {
      ^
examination.cpp: In function 'int main()':
examination.cpp:121:41: error: use of 'auto' in lambda parameter declaration only available with -std=c++14 or -std=gnu++14
  sort(vec.begin(), vec.end(), [&](const auto &A, const auto &B) {
                                         ^~~~
examination.cpp:121:56: error: use of 'auto' in lambda parameter declaration only available with -std=c++14 or -std=gnu++14
  sort(vec.begin(), vec.end(), [&](const auto &A, const auto &B) {
                                                        ^~~~
examination.cpp: In lambda function:
examination.cpp:122:9: error: request for member 'z' in 'A', which is of non-class type 'const int'
   if (A.z == B.z) return A.id < B.id; 
         ^
examination.cpp:122:16: error: request for member 'z' in 'B', which is of non-class type 'const int'
   if (A.z == B.z) return A.id < B.id; 
                ^
examination.cpp:122:28: error: request for member 'id' in 'A', which is of non-class type 'const int'
   if (A.z == B.z) return A.id < B.id; 
                            ^~
examination.cpp:122:35: error: request for member 'id' in 'B', which is of non-class type 'const int'
   if (A.z == B.z) return A.id < B.id; 
                                   ^~
examination.cpp:123:12: error: request for member 'z' in 'A', which is of non-class type 'const int'
   return A.z > B.z;
            ^
examination.cpp:123:18: error: request for member 'z' in 'B', which is of non-class type 'const int'
   return A.z > B.z;
                  ^
examination.cpp: In function 'int main()':
examination.cpp:131:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for (int i = 0; i < vec.size(); i++) {
                  ~~^~~~~~~~~~~~
examination.cpp:134:41: error: use of 'auto' in lambda parameter declaration only available with -std=c++14 or -std=gnu++14
  sort(vec.begin(), vec.end(), [&](const auto &A, const auto &B) {
                                         ^~~~
examination.cpp:134:56: error: use of 'auto' in lambda parameter declaration only available with -std=c++14 or -std=gnu++14
  sort(vec.begin(), vec.end(), [&](const auto &A, const auto &B) {
                                                        ^~~~
examination.cpp: In lambda function:
examination.cpp:135:9: error: request for member 'x' in 'A', which is of non-class type 'const int'
   if (A.x == B.x) return A.pos < B.pos;
         ^
examination.cpp:135:16: error: request for member 'x' in 'B', which is of non-class type 'const int'
   if (A.x == B.x) return A.pos < B.pos;
                ^
examination.cpp:135:28: error: request for member 'pos' in 'A', which is of non-class type 'const int'
   if (A.x == B.x) return A.pos < B.pos;
                            ^~~
examination.cpp:135:36: error: request for member 'pos' in 'B', which is of non-class type 'const int'
   if (A.x == B.x) return A.pos < B.pos;
                                    ^~~
examination.cpp:136:12: error: request for member 'x' in 'A', which is of non-class type 'const int'
   return A.x < B.x;
            ^
examination.cpp:136:18: error: request for member 'x' in 'B', which is of non-class type 'const int'
   return A.x < B.x;
                  ^
In file included from /usr/include/c++/7/bits/stl_algobase.h:71:0,
                 from /usr/include/c++/7/vector:60,
                 from examination.cpp:2:
/usr/include/c++/7/bits/predefined_ops.h: In instantiation of 'bool __gnu_cxx::__ops::_Iter_comp_iter<_Compare>::operator()(_Iterator1, _Iterator2) [with _Iterator1 = __gnu_cxx::__normal_iterator<query*, std::vector<query> >; _Iterator2 = __gnu_cxx::__normal_iterator<query*, std::vector<query> >; _Compare = main()::<lambda(const int&, const int&)>]':
/usr/include/c++/7/bits/stl_algo.h:1847:14:   required from 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<query*, std::vector<query> >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<main()::<lambda(const int&, const int&)> >]'
/usr/include/c++/7/bits/stl_algo.h:1885:25:   required from 'void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<query*, std::vector<query> >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<main()::<lambda(const int&, const int&)> >]'
/usr/include/c++/7/bits/stl_algo.h:1971:31:   required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<query*, std::vector<query> >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<main()::<lambda(const int&, const int&)> >]'
/usr/include/c++/7/bits/stl_algo.h:4868:18:   required from 'void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator<query*, std::vector<query> >; _Compare = main()::<lambda(const int&, const int&)>]'
examination.cpp:124:3:   required from here
/usr/include/c++/7/bits/predefined_ops.h:143:18: error: no match for call to '(main()::<lambda(const int&, const int&)>) (query&, query&)'
         { return bool(_M_comp(*__it1, *__it2)); }
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
examination.cpp:121:63: note: candidate: main()::<lambda(const int&, const int&)>
  sort(vec.begin(), vec.end(), [&](const auto &A, const auto &B) {
                                                               ^
examination.cpp:121:63: note:   no known conversion for argument 1 from 'query' to 'const int&'
In file included from /usr/include/c++/7/bits/stl_algobase.h:71:0,
                 from /usr/include/c++/7/vector:60,
                 from examination.cpp:2:
/usr/include/c++/7/bits/predefined_ops.h: In instantiation of 'bool __gnu_cxx::__ops::_Iter_comp_iter<_Compare>::operator()(_Iterator1, _Iterator2) [with _Iterator1 = __gnu_cxx::__normal_iterator<query*, std::vector<query> >; _Iterator2 = __gnu_cxx::__normal_iterator<query*, std::vector<query> >; _Compare = main()::<lambda(const int&, const int&)>]':
/usr/include/c++/7/bits/stl_algo.h:1847:14:   required from 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<query*, std::vector<query> >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<main()::<lambda(const int&, const int&)> >]'
/usr/include/c++/7/bits/stl_algo.h:1885:25:   required from 'void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<query*, std::vector<query> >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<main()::<lambda(const int&, const int&)> >]'
/usr/include/c++/7/bits/stl_algo.h:1971:31:   required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<query*, std::vector<query> >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<main()::<lambda(const int&, const int&)> >]'
/usr/include/c++/7/bits/stl_algo.h:4868:18:   required from 'void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator<query*, std::vector<query> >; _Compare = main()::<lambda(const int&, const int&)>]'
examination.cpp:137:3:   required from here
/usr/include/c++/7/bits/predefined_ops.h:143:18: error: no match for call to '(main()::<lambda(const int&, const int&)>) (query&, query&)'
         { return bool(_M_comp(*__it1, *__it2)); }
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
examination.cpp:134:63: note: candidate: main()::<lambda(const int&, const int&)>
  sort(vec.begin(), vec.end(), [&](const auto &A, const auto &B) {
                                                               ^
examination.cpp:134:63: note:   no known conversion for argument 1 from 'query' to 'const int&'
In file included from /usr/include/c++/7/bits/stl_algobase.h:71:0,
                 from /usr/include/c++/7/vector:60,
                 from examination.cpp:2:
/usr/include/c++/7/bits/predefined_ops.h: In instantiation of 'bool __gnu_cxx::__ops::_Val_comp_iter<_Compare>::operator()(_Value&, _Iterator) [with _Value = query; _Iterator = __gnu_cxx::__normal_iterator<query*, std::vector<query> >; _Compare = main()::<lambda(const int&, const int&)>]':
/usr/include/c++/7/bits/stl_algo.h:1828:20:   required from 'void std::__unguarded_linear_insert(_RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<query*, std::vector<query> >; _Compare = __gnu_cxx::__ops::_Val_comp_iter<main()::<lambda(const int&, const int&)> >]'
/usr/include/c++/7/bits/stl_algo.h:1855:36:   required from 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<query*, std::vector<query> >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<main()::<lambda(const int&, const int&)> >]'
/usr/include/c++/7/bits/stl_algo.h:1885:25:   required from 'void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<query*, std::vector<query> >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<main()::<lambda(const int&, const int&)> >]'
/usr/include/c++/7/bits/stl_algo.h:1971:31:   required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<query*, std::vector<query> >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<main()::<lambda(const int&, const int&)> >]'
/usr/include/c++/7/bits/stl_algo.h:4868:18:   required from 'void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator<query*, std::vector<query> >; _Compare = main()::<lambda(const int&, const int&)>]'
examination.cpp:124:3:   required from here
/usr/include/c++/7/bits/predefined_ops.h:215:11: error: no match for call to '(main()::<lambda(const int&, const int&)>) (query&, query&)'
  { return bool(_M_comp(__val, *__it)); }
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~
examination.cpp:121:63: note: candidate: main()::<lambda(const int&, const int&)>
  sort(vec.begin(), vec.end(), [&](const auto &A, const auto &B) {
                                                               ^
examination.cpp:121:63: note:   no known conversion for argument 1 from 'query' to 'const int&'
In file included from /usr/include/c++/7/bits/stl_algobase.h:71:0,
                 from /usr/include/c++/7/vector:60,
                 from examination.cpp:2:
/usr/include/c++/7/bits/predefined_ops.h: In instantiation of 'bool __gnu_cxx::__ops::_Val_comp_iter<_Compare>::operator()(_Value&, _Iterator) [with _Value = query; _Iterator = __gnu_cxx::__normal_iterator<query*, std::vector<query> >; _Compare = main()::<lambda(const int&, const int&)>]':
/usr/include/c++/7/bits/stl_algo.h:1828:20:   required from 'void std::__unguarded_linear_insert(_RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<query*, std::vector<query> >; _Compare = __gnu_cxx::__ops::_Val_comp_iter<main()::<lambda(const int&, const int&)> >]'
/usr/include/c++/7/bits/stl_algo.h:1855:36:   required from 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<query*, std::vector<query> >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<main()::<lambda(const int&, const int&)> >]'
/usr/include/c++/7/bits/stl_algo.h:1885:25:   required from 'void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<query*, std::vector<query> >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<main()::<lambda(const int&, const int&)> >]'
/usr/include/c++/7/bits/stl_algo.h:1971:31:   required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<query*, std::vector<query> >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<main()::<lambda(const int&, const int&)> >]'
/usr/include/c++/7/bits/stl_algo.h:4868:18:   required from 'void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator<query*, std::vector<query> >; _Compare = main()::<lambda(const int&, const int&)>]'
examination.cpp:137:3:   required from here
/usr/include/c++/7/bits/predefined_ops.h:215:11: error: no match for call to '(main()::<lambda(const int&, const int&)>) (query&, query&)'
  { return bool(_M_comp(__val, *__it)); }
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~
examination.cpp:134:63: note: candidate: main()::<lambda(const int&, const int&)>
  sort(vec.begin(), vec.end(), [&](const auto &A, const auto &B) {
                                                               ^
examination.cpp:134:63: note:   no known conversion for argument 1 from 'query' to 'const int&'
In file included from /usr/include/c++/7/bits/stl_algobase.h:71:0,
                 from /usr/include/c++/7/vector:60,
                 from examination.cpp:2:
/usr/include/c++/7/bits/predefined_ops.h: In instantiation of 'bool __gnu_cxx::__ops::_Iter_comp_val<_Compare>::operator()(_Iterator, _Value&) [with _Iterator = __gnu_cxx::__normal_iterator<query*, std::vector<query> >; _Value = query; _Compare = main()::<lambda(const int&, const int&)>]':
/usr/include/c++/7/bits/stl_heap.h:133:48:   required from 'void std::__push_heap(_RandomAccessIterator, _Distance, _Distance, _Tp, _Compare&) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<query*, std::vector<query> >; _Distance = long int; _Tp = query; _Compare = __gnu_cxx::__ops::_Iter_comp_val<main()::<lambda(const int&, const int&)> >]'
/usr/include/c++/7/bits/stl_heap.h:237:23:   required from 'void std::__adjust_heap(_RandomAccessIterator, _Distance, _Distance, _Tp, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<query*, std::vector<query> >; _Distance = long int; _Tp = query; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<main()::<lambda(const int&, const int&)> >]'
/usr/include/c++/7/bits/stl_heap.h:342:22:   required from 'void std::__make_heap(_RandomAccessIterator, _RandomAccessIterator, _Compare&) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<query*, std::vector<query> >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<main()::<lambda(const int&, const int&)> >]'
/usr/include/c++/7/bits/stl_algo.h:1672:23:   required from 'void std::__heap_select(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<query*, std::vector<query> >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<main()::<lambda(const int&, const int&)> >]'
/usr/include/c++/7/bits/stl_algo.h:1933:25:   required from 'void std::__partial_sort(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<query*, std::vector<query> >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<main()::<lambda(const int&, const int&)> >]'
/usr/include/c++/7/bits/stl_algo.h:1948:27:   required from 'void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<query*, std::vector<query> >; _Size = long int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<main()::<lambda(const int&, const int&)> >]'
/usr/include/c++/7/bits/stl_algo.h:1968:25:   required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<query*, std::vector<query> >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<main()::<lambda(const int&, const int&)> >]'
/usr/include/c++/7/bits/stl_algo.h:4868:18:   required from 'void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator<query*, std::vector<query> >; _Compare = main()::<lambda(const int&, const int&)>]'
examination.cpp:124:3:   required from here
/usr/include/c++/7/bits/predefined_ops.h:177:11: error: no match for call to '(main()::<lambda(const int&, const int&)>) (query&, query&)'
  { return bool(_M_comp(*__it, __val)); }
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~
examination.cpp:121:63: note: candidate: main()::<lambda(const int&, const int&)>
  sort(vec.begin(), vec.end(), [&](const auto &A, const auto &B) {
                                                               ^
examination.cpp:121:63: note:   no known conversion for argument 1 from 'query' to 'const int&'
In file included from /usr/include/c++/7/bits/stl_algobase.h:71:0,
                 from /usr/include/c++/7/vector:60,
                 from examination.cpp:2:
/usr/include/c++/7/bits/predefined_ops.h: In instantiation of 'bool __gnu_cxx::__ops::_Iter_comp_val<_Compare>::operator()(_Iterator, _Value&) [with _Iterator = __gnu_cxx::__normal_iterator<query*, std::vector<query> >; _Value = query; _Compare = main()::<lambda(const int&, const int&)>]':
/usr/include/c++/7/bits/stl_heap.h:133:48:   required from 'void std::__push_heap(_RandomAccessIterator, _Distance, _Distance, _Tp, _Compare&) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<query*, std::vector<query> >; _Distance = long int; _Tp = query; _Compare = __gnu_cxx::__ops::_Iter_comp_val<main()::<lambda(const int&, const int&)> >]'
/usr/include/c++/7/bits/stl_heap.h:237:23:   required from 'void std::__adjust_heap(_RandomAccessIterator, _Distance, _Distance, _Tp, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<query*, std::vector<query> >; _Distance = long int; _Tp = query; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<main()::<lambda(const int&, const int&)> >]'
/usr/include/c++/7/bits/stl_heap.h:342:22:   required from 'void std::__make_heap(_RandomAccessIterator, _RandomAccessIterator, _Compare&) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<query*, std::vector<query> >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<main()::<lambda(const int&, const int&)> >]'
/usr/include/c++/7/bits/stl_algo.h:1672:23:   required from 'void std::__heap_select(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<query*, std::vector<query> >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<main()::