| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1340418 | biblicaleagle | 3개의 봉우리 (IOI25_triples) | C++20 | 컴파일 에러 | 0 ms | 0 KiB |
#include "triples.h"
#include <map>
#include <set>
#include <algorithm>
#include <cmath>
using namespace std;
long long count_triples(vector<int> H) {
vector<int> X, Y;
for (int i=0; i < H.size(); i++) {
X.push_back(H[i]+i);
Y.push_back(H[i]-i);
}
vector<int> supX = X, supY = Y;
sort(supX.begin(), supX.end());
sort(supY.begin(), supY.end());
supX.erase(unique(supX.begin(), supX.end()), supX.end());
supY.erase(unique(supY.begin(), supY.end()), supY.end());
map<int, vector<int>> invX, invY;
for (int i=0; i < H.size(); i++) {
int x = X[i], y = Y[i];
invX[x].push_back(i);
invY[y].push_back(i);
}
set<array<int, 3>> triples;
for (int i=0; i < H.size(); i++) {
int x = X[i], y = Y[i];
if (x < H.size()) {
int yx = Y[x];
int xx = X[x];
if (i < yx) {
int yyx = Y[yx];
if (yyx == i) triples.insert({i, yx, x});
}
if (xx < H.size()) {
int yxx = Y[xx];
if (yxx == i) triples.insert({i, x, xx});
}
int hx = H[x];
if (i + hx < H.size()) {
if (x == X[i + hx]) triples.insert({i, i + hx, x});
if (x == Y[i + hx]) triples.insert({i, x, i + hx});
}
}
if (y >= 0) {
int hy = H[y];
if (i + hy < H.size()) {
if (y == Y[i + hy]) triples.insert({y, i, i + hy});
}
}
}
for (int x : supX) {
if (invX[x].size() < sqrt(H.size())) {
for (int j: invX[x])
for (int k: invX[x])
if (j < k) {
int yj = Y[j], yk = Y[k];
if ((yk - yj) % 2 == 0) {
int i = (yj + yk) / 2;
if (i >= 0 && i < H.size())
if (H[i] == (yk - yj) / 2) triples.insert({i, j, k});
}
}
} else {
for (int i=0; i < H.size(); i++)
if ((x - X[i]) % 2 == 0 && (x - Y[i]) % 2 == 0) {
int j = (x + X[i]) / 2, k = (x + Y[i]) / 2;
if (j >= 0 && j < H.size() && k >= 0 && k < H.size())
if (X[j] == X[k] == x) triples.insert({i, j, k});
}
}
}
return triples.size();
}
std::vector<int> construct_range(int M, int K) {
return {1, 1, 1};
}
컴파일 시 표준 에러 (stderr) 메시지
triples.cpp: In function 'long long int count_triples(std::vector<int>)':
triples.cpp:41:37: error: no matching function for call to 'std::set<std::array<int, 3> >::insert(<brace-enclosed initializer list>)'
41 | if (yyx == i) triples.insert({i, yx, x});
| ~~~~~~~~~~~~~~^~~~~~~~~~~~
In file included from /usr/include/c++/13/set:63,
from triples.cpp:4:
/usr/include/c++/13/bits/stl_set.h:568:9: note: candidate: 'template<class _InputIterator> void std::set<_Key, _Compare, _Alloc>::insert(_InputIterator, _InputIterator) [with _Key = std::array<int, 3>; _Compare = std::less<std::array<int, 3> >; _Alloc = std::allocator<std::array<int, 3> >]'
568 | insert(_InputIterator __first, _InputIterator __last)
| ^~~~~~
/usr/include/c++/13/bits/stl_set.h:568:9: note: template argument deduction/substitution failed:
triples.cpp:41:37: note: candidate expects 2 arguments, 1 provided
41 | if (yyx == i) triples.insert({i, yx, x});
| ~~~~~~~~~~~~~~^~~~~~~~~~~~
/usr/include/c++/13/bits/stl_set.h:511:7: note: candidate: 'std::pair<typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key>::other>::const_iterator, bool> std::set<_Key, _Compare, _Alloc>::insert(const value_type&) [with _Key = std::array<int, 3>; _Compare = std::less<std::array<int, 3> >; _Alloc = std::allocator<std::array<int, 3> >; typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key>::other>::const_iterator = std::_Rb_tree<std::array<int, 3>, std::array<int, 3>, std::_Identity<std::array<int, 3> >, std::less<std::array<int, 3> >, std::allocator<std::array<int, 3> > >::const_iterator; typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key>::other = std::allocator<std::array<int, 3> >; typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key> = __gnu_cxx::__alloc_traits<std::allocator<std::array<int, 3> >, std::array<int, 3> >::rebind<std::array<int, 3> >; typename _Allocator::value_type = std::array<int, 3>; value_type = std::array<int, 3>]'
511 | insert(const value_type& __x)
| ^~~~~~
/usr/include/c++/13/bits/stl_set.h:511:32: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const std::set<std::array<int, 3> >::value_type&' {aka 'const std::array<int, 3>&'}
511 | insert(const value_type& __x)
| ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/13/bits/stl_set.h:520:7: note: candidate: 'std::pair<typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key>::other>::const_iterator, bool> std::set<_Key, _Compare, _Alloc>::insert(value_type&&) [with _Key = std::array<int, 3>; _Compare = std::less<std::array<int, 3> >; _Alloc = std::allocator<std::array<int, 3> >; typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key>::other>::const_iterator = std::_Rb_tree<std::array<int, 3>, std::array<int, 3>, std::_Identity<std::array<int, 3> >, std::less<std::array<int, 3> >, std::allocator<std::array<int, 3> > >::const_iterator; typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key>::other = std::allocator<std::array<int, 3> >; typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key> = __gnu_cxx::__alloc_traits<std::allocator<std::array<int, 3> >, std::array<int, 3> >::rebind<std::array<int, 3> >; typename _Allocator::value_type = std::array<int, 3>; value_type = std::array<int, 3>]'
520 | insert(value_type&& __x)
| ^~~~~~
/usr/include/c++/13/bits/stl_set.h:520:27: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::set<std::array<int, 3> >::value_type&&' {aka 'std::array<int, 3>&&'}
520 | insert(value_type&& __x)
| ~~~~~~~~~~~~~^~~
/usr/include/c++/13/bits/stl_set.h:548:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::insert(const_iterator, const value_type&) [with _Key = std::array<int, 3>; _Compare = std::less<std::array<int, 3> >; _Alloc = std::allocator<std::array<int, 3> >; iterator = std::_Rb_tree<std::array<int, 3>, std::array<int, 3>, std::_Identity<std::array<int, 3> >, std::less<std::array<int, 3> >, std::allocator<std::array<int, 3> > >::const_iterator; const_iterator = std::_Rb_tree<std::array<int, 3>, std::array<int, 3>, std::_Identity<std::array<int, 3> >, std::less<std::array<int, 3> >, std::allocator<std::array<int, 3> > >::const_iterator; value_type = std::array<int, 3>]'
548 | insert(const_iterator __position, const value_type& __x)
| ^~~~~~
/usr/include/c++/13/bits/stl_set.h:548:7: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/13/bits/stl_set.h:553:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::insert(const_iterator, value_type&&) [with _Key = std::array<int, 3>; _Compare = std::less<std::array<int, 3> >; _Alloc = std::allocator<std::array<int, 3> >; iterator = std::_Rb_tree<std::array<int, 3>, std::array<int, 3>, std::_Identity<std::array<int, 3> >, std::less<std::array<int, 3> >, std::allocator<std::array<int, 3> > >::const_iterator; const_iterator = std::_Rb_tree<std::array<int, 3>, std::array<int, 3>, std::_Identity<std::array<int, 3> >, std::less<std::array<int, 3> >, std::allocator<std::array<int, 3> > >::const_iterator; value_type = std::array<int, 3>]'
553 | insert(const_iterator __position, value_type&& __x)
| ^~~~~~
/usr/include/c++/13/bits/stl_set.h:553:7: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/13/bits/stl_set.h:580:7: note: candidate: 'void std::set<_Key, _Compare, _Alloc>::insert(std::initializer_list<_Tp>) [with _Key = std::array<int, 3>; _Compare = std::less<std::array<int, 3> >; _Alloc = std::allocator<std::array<int, 3> >]'
580 | insert(initializer_list<value_type> __l)
| ^~~~~~
/usr/include/c++/13/bits/stl_set.h:580:43: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::initializer_list<std::array<int, 3> >'
580 | insert(initializer_list<value_type> __l)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/13/bits/stl_set.h:600:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::insert_return_type std::set<_Key, _Compare, _Alloc>::insert(node_type&&) [with _Key = std::array<int, 3>; _Compare = std::less<std::array<int, 3> >; _Alloc = std::allocator<std::array<int, 3> >; insert_return_type = std::_Rb_tree<std::array<int, 3>, std::array<int, 3>, std::_Identity<std::array<int, 3> >, std::less<std::array<int, 3> >, std::allocator<std::array<int, 3> > >::insert_return_type; node_type = std::_Rb_tree<std::array<int, 3>, std::array<int, 3>, std::_Identity<std::array<int, 3> >, std::less<std::array<int, 3> >, std::allocator<std::array<int, 3> > >::node_type]'
600 | insert(node_type&& __nh)
| ^~~~~~
/usr/include/c++/13/bits/stl_set.h:600:26: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::set<std::array<int, 3> >::node_type&&' {aka 'std::_Rb_tree<std::array<int, 3>, std::array<int, 3>, std::_Identity<std::array<int, 3> >, std::less<std::array<int, 3> >, std::allocator<std::array<int, 3> > >::node_type&&'}
600 | insert(node_type&& __nh)
| ~~~~~~~~~~~~^~~~
/usr/include/c++/13/bits/stl_set.h:605:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::insert(const_iterator, node_type&&) [with _Key = std::array<int, 3>; _Compare = std::less<std::array<int, 3> >; _Alloc = std::allocator<std::array<int, 3> >; iterator = std::_Rb_tree<std::array<int, 3>, std::array<int, 3>, std::_Identity<std::array<int, 3> >, std::less<std::array<int, 3> >, std::allocator<std::array<int, 3> > >::const_iterator; const_iterator = std::_Rb_tree<std::array<int, 3>, std::array<int, 3>, std::_Identity<std::array<int, 3> >, std::less<std::array<int, 3> >, std::allocator<std::array<int, 3> > >::const_iterator; node_type = std::_Rb_tree<std::array<int, 3>, std::array<int, 3>, std::_Identity<std::array<int, 3> >, std::less<std::array<int, 3> >, std::allocator<std::array<int, 3> > >::node_type]'
605 | insert(const_iterator __hint, node_type&& __nh)
| ^~~~~~
/usr/include/c++/13/bits/stl_set.h:605:7: note: candidate expects 2 arguments, 1 provided
triples.cpp:46:37: error: no matching function for call to 'std::set<std::array<int, 3> >::insert(<brace-enclosed initializer list>)'
46 | if (yxx == i) triples.insert({i, x, xx});
| ~~~~~~~~~~~~~~^~~~~~~~~~~~
/usr/include/c++/13/bits/stl_set.h:568:9: note: candidate: 'template<class _InputIterator> void std::set<_Key, _Compare, _Alloc>::insert(_InputIterator, _InputIterator) [with _Key = std::array<int, 3>; _Compare = std::less<std::array<int, 3> >; _Alloc = std::allocator<std::array<int, 3> >]'
568 | insert(_InputIterator __first, _InputIterator __last)
| ^~~~~~
/usr/include/c++/13/bits/stl_set.h:568:9: note: template argument deduction/substitution failed:
triples.cpp:46:37: note: candidate expects 2 arguments, 1 provided
46 | if (yxx == i) triples.insert({i, x, xx});
| ~~~~~~~~~~~~~~^~~~~~~~~~~~
/usr/include/c++/13/bits/stl_set.h:511:7: note: candidate: 'std::pair<typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key>::other>::const_iterator, bool> std::set<_Key, _Compare, _Alloc>::insert(const value_type&) [with _Key = std::array<int, 3>; _Compare = std::less<std::array<int, 3> >; _Alloc = std::allocator<std::array<int, 3> >; typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key>::other>::const_iterator = std::_Rb_tree<std::array<int, 3>, std::array<int, 3>, std::_Identity<std::array<int, 3> >, std::less<std::array<int, 3> >, std::allocator<std::array<int, 3> > >::const_iterator; typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key>::other = std::allocator<std::array<int, 3> >; typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key> = __gnu_cxx::__alloc_traits<std::allocator<std::array<int, 3> >, std::array<int, 3> >::rebind<std::array<int, 3> >; typename _Allocator::value_type = std::array<int, 3>; value_type = std::array<int, 3>]'
511 | insert(const value_type& __x)
| ^~~~~~
/usr/include/c++/13/bits/stl_set.h:511:32: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const std::set<std::array<int, 3> >::value_type&' {aka 'const std::array<int, 3>&'}
511 | insert(const value_type& __x)
| ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/13/bits/stl_set.h:520:7: note: candidate: 'std::pair<typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key>::other>::const_iterator, bool> std::set<_Key, _Compare, _Alloc>::insert(value_type&&) [with _Key = std::array<int, 3>; _Compare = std::less<std::array<int, 3> >; _Alloc = std::allocator<std::array<int, 3> >; typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key>::other>::const_iterator = std::_Rb_tree<std::array<int, 3>, std::array<int, 3>, std::_Identity<std::array<int, 3> >, std::less<std::array<int, 3> >, std::allocator<std::array<int, 3> > >::const_iterator; typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key>::other = std::allocator<std::array<int, 3> >; typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key> = __gnu_cxx::__alloc_traits<std::allocator<std::array<int, 3> >, std::array<int, 3> >::rebind<std::array<int, 3> >; typename _Allocator::value_type = std::array<int, 3>; value_type = std::array<int, 3>]'
520 | insert(value_type&& __x)
| ^~~~~~
/usr/include/c++/13/bits/stl_set.h:520:27: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::set<std::array<int, 3> >::value_type&&' {aka 'std::array<int, 3>&&'}
520 | insert(value_type&& __x)
| ~~~~~~~~~~~~~^~~
/usr/include/c++/13/bits/stl_set.h:548:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::insert(const_iterator, const value_type&) [with _Key = std::array<int, 3>; _Compare = std::less<std::array<int, 3> >; _Alloc = std::allocator<std::array<int, 3> >; iterator = std::_Rb_tree<std::array<int, 3>, std::array<int, 3>, std::_Identity<std::array<int, 3> >, std::less<std::array<int, 3> >, std::allocator<std::array<int, 3> > >::const_iterator; const_iterator = std::_Rb_tree<std::array<int, 3>, std::array<int, 3>, std::_Identity<std::array<int, 3> >, std::less<std::array<int, 3> >, std::allocator<std::array<int, 3> > >::const_iterator; value_type = std::array<int, 3>]'
548 | insert(const_iterator __position, const value_type& __x)
| ^~~~~~
/usr/include/c++/13/bits/stl_set.h:548:7: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/13/bits/stl_set.h:553:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::insert(const_iterator, value_type&&) [with _Key = std::array<int, 3>; _Compare = std::less<std::array<int, 3> >; _Alloc = std::allocator<std::array<int, 3> >; iterator = std::_Rb_tree<std::array<int, 3>, std::array<int, 3>, std::_Identity<std::array<int, 3> >, std::less<std::array<int, 3> >, std::allocator<std::array<int, 3> > >::const_iterator; const_iterator = std::_Rb_tree<std::array<int, 3>, std::array<int, 3>, std::_Identity<std::array<int, 3> >, std::less<std::array<int, 3> >, std::allocator<std::array<int, 3> > >::const_iterator; value_type = std::array<int, 3>]'
553 | insert(const_iterator __position, value_type&& __x)
| ^~~~~~
/usr/include/c++/13/bits/stl_set.h:553:7: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/13/bits/stl_set.h:580:7: note: candidate: 'void std::set<_Key, _Compare, _Alloc>::insert(std::initializer_list<_Tp>) [with _Key = std::array<int, 3>; _Compare = std::less<std::array<int, 3> >; _Alloc = std::allocator<std::array<int, 3> >]'
580 | insert(initializer_list<value_type> __l)
| ^~~~~~
/usr/include/c++/13/bits/stl_set.h:580:43: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::initializer_list<std::array<int, 3> >'
580 | insert(initializer_list<value_type> __l)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/13/bits/stl_set.h:600:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::insert_return_type std::set<_Key, _Compare, _Alloc>::insert(node_type&&) [with _Key = std::array<int, 3>; _Compare = std::less<std::array<int, 3> >; _Alloc = std::allocator<std::array<int, 3> >; insert_return_type = std::_Rb_tree<std::array<int, 3>, std::array<int, 3>, std::_Identity<std::array<int, 3> >, std::less<std::array<int, 3> >, std::allocator<std::array<int, 3> > >::insert_return_type; node_type = std::_Rb_tree<std::array<int, 3>, std::array<int, 3>, std::_Identity<std::array<int, 3> >, std::less<std::array<int, 3> >, std::allocator<std::array<int, 3> > >::node_type]'
600 | insert(node_type&& __nh)
| ^~~~~~
/usr/include/c++/13/bits/stl_set.h:600:26: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::set<std::array<int, 3> >::node_type&&' {aka 'std::_Rb_tree<std::array<int, 3>, std::array<int, 3>, std::_Identity<std::array<int, 3> >, std::less<std::array<int, 3> >, std::allocator<std::array<int, 3> > >::node_type&&'}
600 | insert(node_type&& __nh)
| ~~~~~~~~~~~~^~~~
/usr/include/c++/13/bits/stl_set.h:605:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::insert(const_iterator, node_type&&) [with _Key = std::array<int, 3>; _Compare = std::less<std::array<int, 3> >; _Alloc = std::allocator<std::array<int, 3> >; iterator = std::_Rb_tree<std::array<int, 3>, std::array<int, 3>, std::_Identity<std::array<int, 3> >, std::less<std::array<int, 3> >, std::allocator<std::array<int, 3> > >::const_iterator; const_iterator = std::_Rb_tree<std::array<int, 3>, std::array<int, 3>, std::_Identity<std::array<int, 3> >, std::less<std::array<int, 3> >, std::allocator<std::array<int, 3> > >::const_iterator; node_type = std::_Rb_tree<std::array<int, 3>, std::array<int, 3>, std::_Identity<std::array<int, 3> >, std::less<std::array<int, 3> >, std::allocator<std::array<int, 3> > >::node_type]'
605 | insert(const_iterator __hint, node_type&& __nh)
| ^~~~~~
/usr/include/c++/13/bits/stl_set.h:605:7: note: candidate expects 2 arguments, 1 provided
triples.cpp:51:43: error: no matching function for call to 'std::set<std::array<int, 3> >::insert(<brace-enclosed initializer list>)'
51 | if (x == X[i + hx]) triples.insert({i, i + hx, x});
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
/usr/include/c++/13/bits/stl_set.h:568:9: note: candidate: 'template<class _InputIterator> void std::set<_Key, _Compare, _Alloc>::insert(_InputIterator, _InputIterator) [with _Key = std::array<int, 3>; _Compare = std::less<std::array<int, 3> >; _Alloc = std::allocator<std::array<int, 3> >]'
568 | insert(_InputIterator __first, _InputIterator __last)
| ^~~~~~
/usr/include/c++/13/bits/stl_set.h:568:9: note: template argument deduction/substitution failed:
triples.cpp:51:43: note: candidate expects 2 arguments, 1 provided
51 | if (x == X[i + hx]) triples.insert({i, i + hx, x});
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
/usr/include/c++/13/bits/stl_set.h:511:7: note: candidate: 'std::pair<typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key>::other>::const_iterator, bool> std::set<_Key, _Compare, _Alloc>::insert(const value_type&) [with _Key = std::array<int, 3>; _Compare = std::less<std::array<int, 3> >; _Alloc = std::allocator<std::array<int, 3> >; typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key>::other>::const_iterator = std::_Rb_tree<std::array<int, 3>, std::array<int, 3>, std::_Identity<std::array<int, 3> >, std::less<std::array<int, 3> >, std::allocator<std::array<int, 3> > >::const_iterator; typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key>::other = std::allocator<std::array<int, 3> >; typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key> = __gnu_cxx::__alloc_traits<std::allocator<std::array<int, 3> >, std::array<int, 3> >::rebind<std::array<int, 3> >; typename _Allocator::value_type = std::array<int, 3>; value_type = std::array<int, 3>]'
511 | insert(const value_type& __x)
| ^~~~~~
/usr/include/c++/13/bits/stl_set.h:511:32: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const std::set<std::array<int, 3> >::value_type&' {aka 'const std::array<int, 3>&'}
511 | insert(const value_type& __x)
| ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/13/bits/stl_set.h:520:7: note: candidate: 'std::pair<typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key>::other>::const_iterator, bool> std::set<_Key, _Compare, _Alloc>::insert(value_type&&) [with _Key = std::array<int, 3>; _Compare = std::less<std::array<int, 3> >; _Alloc = std::allocator<std::array<int, 3> >; typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key>::other>::const_iterator = std::_Rb_tree<std::array<int, 3>, std::array<int, 3>, std::_Identity<std::array<int, 3> >, std::less<std::array<int, 3> >, std::allocator<std::array<int, 3> > >::const_iterator; typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key>::other = std::allocator<std::array<int, 3> >; typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key> = __gnu_cxx::__alloc_traits<std::allocator<std::array<int, 3> >, std::array<int, 3> >::rebind<std::array<int, 3> >; typename _Allocator::value_type = std::array<int, 3>; value_type = std::array<int, 3>]'
520 | insert(value_type&& __x)
| ^~~~~~
/usr/include/c++/13/bits/stl_set.h:520:27: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::set<std::array<int, 3> >::value_type&&' {aka 'std::array<int, 3>&&'}
520 | insert(value_type&& __x)
| ~~~~~~~~~~~~~^~~
/usr/include/c++/13/bits/stl_set.h:548:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::insert(const_iterator, const value_type&) [with _Key = std::array<int, 3>; _Compare = std::less<std::array<int, 3> >; _Alloc = std::allocator<std::array<int, 3> >; iterator = std::_Rb_tree<std::array<int, 3>, std::array<int, 3>, std::_Identity<std::array<int, 3> >, std::less<std::array<int, 3> >, std::allocator<std::array<int, 3> > >::const_iterator; const_iterator = std::_Rb_tree<std::array<int, 3>, std::array<int, 3>, std::_Identity<std::array<int, 3> >, std::less<std::array<int, 3> >, std::allocator<std::array<int, 3> > >::const_iterator; value_type = std::array<int, 3>]'
548 | insert(const_iterator __position, const value_type& __x)
| ^~~~~~
/usr/include/c++/13/bits/stl_set.h:548:7: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/13/bits/stl_set.h:553:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::insert(const_iterator, value_type&&) [with _Key = std::array<int, 3>; _Compare = std::less<std::array<int, 3> >; _Alloc = std::allocator<std::array<int, 3> >; iterator = std::_Rb_tree<std::array<int, 3>, std::array<int, 3>, std::_Identity<std::array<int, 3> >, std::less<std::array<int, 3> >, std::allocator<std::array<int, 3> > >::const_iterator; const_iterator = std::_Rb_tree<std::array<int, 3>, std::array<int, 3>, std::_Identity<std::array<int, 3> >, std::less<std::array<int, 3> >, std::allocator<std::array<int, 3> > >::const_iterator; value_type = std::array<int, 3>]'
553 | insert(const_iterator __position, value_type&& __x)
| ^~~~~~
/usr/include/c++/13/bits/stl_set.h:553:7: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/13/bits/stl_set.h:580:7: note: candidate: 'void std::set<_Key, _Compare, _Alloc>::insert(std::initializer_list<_Tp>) [with _Key = std::array<int, 3>; _Compare = std::less<std::array<int, 3> >; _Alloc = std::allocator<std::array<int, 3> >]'
580 | insert(initializer_list<value_type> __l)
| ^~~~~~
/usr/include/c++/13/bits/stl_set.h:580:43: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::initializer_list<std::array<int, 3> >'
580 | insert(initializer_list<value_type> __l)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/13/bits/stl_set.h:600:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::insert_return_type std::set<_Key, _Compare, _Alloc>::insert(node_type&&) [with _Key = std::array<int, 3>; _Compare = std::less<std::array<int, 3> >; _Alloc = std::allocator<std::array<int, 3> >; insert_return_type = std::_Rb_tree<std::array<int, 3>, std::array<int, 3>, std::_Identity<std::array<int, 3> >, std::less<std::array<int, 3> >, std::allocator<std::array<int, 3> > >::insert_return_type; node_type = std::_Rb_tree<std::array<int, 3>, std::array<int, 3>, std::_Identity<std::array<int, 3> >, std::less<std::array<int, 3> >, std::allocator<std::array<int, 3> > >::node_type]'
600 | insert(node_type&& __nh)
| ^~~~~~
/usr/include/c++/13/bits/stl_set.h:600:26: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::set<std::array<int, 3> >::node_type&&' {aka 'std::_Rb_tree<std::array<int, 3>, std::array<int, 3>, std::_Identity<std::array<int, 3> >, std::less<std::array<int, 3> >, std::allocator<std::array<int, 3> > >::node_type&&'}
600 | insert(node_type&& __nh)
| ~~~~~~~~~~~~^~~~
/usr/include/c++/13/bits/stl_set.h:605:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::insert(const_iterator, node_type&&) [with _Key = std::array<int, 3>; _Compare = std::less<std::array<int, 3> >; _Alloc = std::allocator<std::array<int, 3> >; iterator = std::_Rb_tree<std::array<int, 3>, std::array<int, 3>, std::_Identity<std::array<int, 3> >, std::less<std::array<int, 3> >, std::allocator<std::array<int, 3> > >::const_iterator; const_iterator = std::_Rb_tree<std::array<int, 3>, std::array<int, 3>, std::_Identity<std::array<int, 3> >, std::less<std::array<int, 3> >, std::allocator<std::array<int, 3> > >::const_iterator; node_type = std::_Rb_tree<std::array<int, 3>, std::array<int, 3>, std::_Identity<std::array<int, 3> >, std::less<std::array<int, 3> >, std::allocator<std::array<int, 3> > >::node_type]'
605 | insert(const_iterator __hint, node_type&& __nh)
| ^~~~~~
/usr/include/c++/13/bits/stl_set.h:605:7: note: candidate expects 2 arguments, 1 provided
triples.cpp:52:43: error: no matching function for call to 'std::set<std::array<int, 3> >::insert(<brace-enclosed initializer list>)'
52 | if (x == Y[i + hx]) triples.insert({i, x, i + hx});
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
/usr/include/c++/13/bits/stl_set.h:568:9: note: candidate: 'template<class _InputIterator> void std::set<_Key, _Compare, _Alloc>::insert(_InputIterator, _InputIterator) [with _Key = std::array<int, 3>; _Compare = std::less<std::array<int, 3> >; _Alloc = std::allocator<std::array<int, 3> >]'
568 | insert(_InputIterator __first, _InputIterator __last)
| ^~~~~~
/usr/include/c++/13/bits/stl_set.h:568:9: note: template argument deduction/substitution failed:
triples.cpp:52:43: note: candidate expects 2 arguments, 1 provided
52 | if (x == Y[i + hx]) triples.insert({i, x, i + hx});
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
/usr/include/c++/13/bits/stl_set.h:511:7: note: candidate: 'std::pair<typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key>::other>::const_iterator, bool> std::set<_Key, _Compare, _Alloc>::insert(const value_type&) [with _Key = std::array<int, 3>; _Compare = std::less<std::array<int, 3> >; _Alloc = std::allocator<std::array<int, 3> >; typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key>::other>::const_iterator = std::_Rb_tree<std::array<int, 3>, std::array<int, 3>, std::_Identity<std::array<int, 3> >, std::less<std::array<int, 3> >, std::allocator<std::array<int, 3> > >::const_iterator; typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key>::other = std::allocator<std::array<int, 3> >; typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key> = __gnu_cxx::__alloc_traits<std::allocator<std::array<int, 3> >, std::array<int, 3> >::rebind<std::array<int, 3> >; typename _Allocator::value_type = std::array<int, 3>; value_type = std::array<int, 3>]'
511 | insert(const value_type& __x)
| ^~~~~~
/usr/include/c++/13/bits/stl_set.h:511:32: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const std::set<std::array<int, 3> >::value_type&' {aka 'const std::array<int, 3>&'}
511 | insert(const value_type& __x)
| ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/13/bits/stl_set.h:520:7: note: candidate: 'std::pair<typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key>::other>::const_iterator, bool> std::set<_Key, _Compare, _Alloc>::insert(value_type&&) [with _Key = std::array<int, 3>; _Compare = std::less<std::array<int, 3> >; _Alloc = std::allocator<std::array<int, 3> >; typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key>::other>::const_iterator = std::_Rb_tree<std::array<int, 3>, std::array<int, 3>, std::_Identity<std::array<int, 3> >, std::less<std::array<int, 3> >, std::allocator<std::array<int, 3> > >::const_iterator; typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key>::other = std::allocator<std::array<int, 3> >; typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key> = __gnu_cxx::__alloc_traits<std::allocator<std::array<int, 3> >, std::array<int, 3> >::rebind<std::array<int, 3> >; typename _Allocator::value_type = std::array<int, 3>; value_type = std::array<int, 3>]'
520 | insert(value_type&& __x)
| ^~~~~~
/usr/include/c++/13/bits/stl_set.h:520:27: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::set<std::array<int, 3> >::value_type&&' {aka 'std::array<int, 3>&&'}
520 | insert(value_type&& __x)
| ~~~~~~~~~~~~~^~~
/usr/include/c++/13/bits/stl_set.h:548:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::insert(const_iterator, const value_type&) [with _Key = std::array<int, 3>; _Compare = std::less<std::array<int, 3> >; _Alloc = std::allocator<std::array<int, 3> >; iterator = std::_Rb_tree<std::array<int, 3>, std::array<int, 3>, std::_Identity<std::array<int, 3> >, std::less<std::array<int, 3> >, std::allocator<std::array<int, 3> > >::const_iterator; const_iterator = std::_Rb_tree<std::array<int, 3>, std::array<int, 3>, std::_Identity<std::array<int, 3> >, std::less<std::array<int, 3> >, std::allocator<std::array<int, 3> > >::const_iterator; value_type = std::array<int, 3>]'
548 | insert(const_iterator __position, const value_type& __x)
| ^~~~~~
/usr/include/c++/13/bits/stl_set.h:548:7: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/13/bits/stl_set.h:553:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::insert(const_iterator, value_type&&) [with _Key = std::array<int, 3>; _Compare = std::less<std::array<int, 3> >; _Alloc = std::allocator<std::array<int, 3> >; iterator = std::_Rb_tree<std::array<int, 3>, std::array<int, 3>, std::_Identity<std::array<int, 3> >, std::less<std::array<int, 3> >, std::allocator<std::array<int, 3> > >::const_iterator; const_iterator = std::_Rb_tree<std::array<int, 3>, std::array<int, 3>, std::_Identity<std::array<int, 3> >, std::less<std::array<int, 3> >, std::allocator<std::array<int, 3> > >::const_iterator; value_type = std::array<int, 3>]'
553 | insert(const_iterator __position, value_type&& __x)
| ^~~~~~
/usr/include/c++/13/bits/stl_set.h:553:7: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/13/bits/stl_set.h:580:7: note: candidate: 'void std::set<_Key, _Compare, _Alloc>::insert(std::initializer_list<_Tp>) [with _Key = std::array<int, 3>; _Compare = std::less<std::array<int, 3> >; _Alloc = std::allocator<std::array<int, 3> >]'
580 | insert(initializer_list<value_type> __l)
| ^~~~~~
/usr/include/c++/13/bits/stl_set.h:580:43: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::initializer_list<std::array<int, 3> >'
580 | insert(initializer_list<value_type> __l)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/13/bits/stl_set.h:600:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::insert_return_type std::set<_Key, _Compare, _Alloc>::insert(node_type&&) [with _Key = std::array<int, 3>; _Compare = std::less<std::array<int, 3> >; _Alloc = std::allocator<std::array<int, 3> >; insert_return_type = std::_Rb_tree<std::array<int, 3>, std::array<int, 3>, std::_Identity<std::array<int, 3> >, std::less<std::array<int, 3> >, std::allocator<std::array<int, 3> > >::insert_return_type; node_type = std::_Rb_tree<std::array<int, 3>, std::array<int, 3>, std::_Identity<std::array<int, 3> >, std::less<std::array<int, 3> >, std::allocator<std::array<int, 3> > >::node_type]'
600 | insert(node_type&& __nh)
| ^~~~~~
/usr/include/c++/13/bits/stl_set.h:600:26: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::set<std::array<int, 3> >::node_type&&' {aka 'std::_Rb_tree<std::array<int, 3>, std::array<int, 3>, std::_Identity<std::array<int, 3> >, std::less<std::array<int, 3> >, std::allocator<std::array<int, 3> > >::node_type&&'}
600 | insert(node_type&& __nh)
| ~~~~~~~~~~~~^~~~
/usr/include/c++/13/bits/stl_set.h:605:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::insert(const_iterator, node_type&&) [with _Key = std::array<int, 3>; _Compare = std::less<std::array<int, 3> >; _Alloc = std::allocator<std::array<int, 3> >; iterator = std::_Rb_tree<std::array<int, 3>, std::array<int, 3>, std::_Identity<std::array<int, 3> >, std::less<std::array<int, 3> >, std::allocator<std::array<int, 3> > >::const_iterator; const_iterator = std::_Rb_tree<std::array<int, 3>, std::array<int, 3>, std::_Identity<std::array<int, 3> >, std::less<std::array<int, 3> >, std::allocator<std::array<int, 3> > >::const_iterator; node_type = std::_Rb_tree<std::array<int, 3>, std::array<int, 3>, std::_Identity<std::array<int, 3> >, std::less<std::array<int, 3> >, std::allocator<std::array<int, 3> > >::node_type]'
605 | insert(const_iterator __hint, node_type&& __nh)
| ^~~~~~
/usr/include/c++/13/bits/stl_set.h:605:7: note: candidate expects 2 arguments, 1 provided
triples.cpp:59:43: error: no matching function for call to 'std::set<std::array<int, 3> >::insert(<brace-enclosed initializer list>)'
59 | if (y == Y[i + hy]) triples.insert({y, i, i + hy});
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
/usr/include/c++/13/bits/stl_set.h:568:9: note: candidate: 'template<class _InputIterator> void std::set<_Key, _Compare, _Alloc>::insert(_InputIterator, _InputIterator) [with _Key = std::array<int, 3>; _Compare = std::less<std::array<int, 3> >; _Alloc = std::allocator<std::array<int, 3> >]'
568 | insert(_InputIterator __first, _InputIterator __last)
| ^~~~~~
/usr/include/c++/13/bits/stl_set.h:568:9: note: template argument deduction/substitution failed:
triples.cpp:59:43: note: candidate expects 2 arguments, 1 provided
59 | if (y == Y[i + hy]) triples.insert({y, i, i + hy});
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
/usr/include/c++/13/bits/stl_set.h:511:7: note: candidate: 'std::pair<typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key>::other>::const_iterator, bool> std::set<_Key, _Compare, _Alloc>::insert(const value_type&) [with _Key = std::array<int, 3>; _Compare = std::less<std::array<int, 3> >; _Alloc = std::allocator<std::array<int, 3> >; typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key>::other>::const_iterator = std::_Rb_tree<std::array<int, 3>, std::array<int, 3>, std::_Identity<std::array<int, 3> >, std::less<std::array<int, 3> >, std::allocator<std::array<int, 3> > >::const_iterator; typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key>::other = std::allocator<std::array<int, 3> >; typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key> = __gnu_cxx::__alloc_traits<std::allocator<std::array<int, 3> >, std::array<int, 3> >::rebind<std::array<int, 3> >; typename _Allocator::value_type = std::array<int, 3>; value_type = std::array<int, 3>]'
511 | insert(const value_type& __x)
| ^~~~~~
/usr/include/c++/13/bits/stl_set.h:511:32: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const std::set<std::array<int, 3> >::value_type&' {aka 'const std::array<int, 3>&'}
511 | insert(const value_type& __x)
| ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/13/bits/stl_set.h:520:7: note: candidate: 'std::pair<typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key>::other>::const_iterator, bool> std::set<_Key, _Compare, _Alloc>::insert(value_type&&) [with _Key = std::array<int, 3>; _Compare = std::less<std::array<int, 3> >; _Alloc = std::allocator<std::array<int, 3> >; typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key>::other>::const_iterator = std::_Rb_tree<std::array<int, 3>, std::array<int, 3>, std::_Identity<std::array<int, 3> >, std::less<std::array<int, 3> >, std::allocator<std::array<int, 3> > >::const_iterator; typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key>::other = std::allocator<std::array<int, 3> >; typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key> = __gnu_cxx::__alloc_traits<std::allocator<std::array<int, 3> >, std::array<int, 3> >::rebind<std::array<int, 3> >; typename _Allocator::value_type = std::array<int, 3>; value_type = std::array<int, 3>]'
520 | insert(value_type&& __x)
| ^~~~~~
/usr/include/c++/13/bits/stl_set.h:520:27: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::set<std::array<int, 3> >::value_type&&' {aka 'std::array<int, 3>&&'}
520 | insert(value_type&& __x)
| ~~~~~~~~~~~~~^~~
/usr/include/c++/13/bits/stl_set.h:548:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::insert(const_iterator, const value_type&) [with _Key = std::array<int, 3>; _Compare = std::less<std::array<int, 3> >; _Alloc = std::allocator<std::array<int, 3> >; iterator = std::_Rb_tree<std::array<int, 3>, std::array<int, 3>, std::_Identity<std::array<int, 3> >, std::less<std::array<int, 3> >, std::allocator<std::array<int, 3> > >::const_iterator; const_iterator = std::_Rb_tree<std::array<int, 3>, std::array<int, 3>, std::_Identity<std::array<int, 3> >, std::less<std::array<int, 3> >, std::allocator<std::array<int, 3> > >::const_iterator; value_type = std::array<int, 3>]'
548 | insert(const_iterator __position, const value_type& __x)
| ^~~~~~
/usr/include/c++/13/bits/stl_set.h:548:7: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/13/bits/stl_set.h:553:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::insert(const_iterator, value_type&&) [with _Key = std::array<int, 3>; _Compare = std::less<std::array<int, 3> >; _Alloc = std::allocator<std::array<int, 3> >; iterator = std::_Rb_tree<std::array<int, 3>, std::array<int, 3>, std::_Identity<std::array<int, 3> >, std::less<std::array<int, 3> >, std::allocator<std::array<int, 3> > >::const_iterator; const_iterator = std::_Rb_tree<std::array<int, 3>, std::array<int, 3>, std::_Identity<std::array<int, 3> >, std::less<std::array<int, 3> >, std::allocator<std::array<int, 3> > >::const_iterator; value_type = std::array<int, 3>]'
553 | insert(const_iterator __position, value_type&& __x)
| ^~~~~~
/usr/include/c++/13/bits/stl_set.h:553:7: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/13/bits/stl_set.h:580:7: note: candidate: 'void std::set<_Key, _Compare, _Alloc>::insert(std::initializer_list<_Tp>) [with _Key = std::array<int, 3>; _Compare = std::less<std::array<int, 3> >; _Alloc = std::allocator<std::array<int, 3> >]'
580 | insert(initializer_list<value_type> __l)
| ^~~~~~
/usr/include/c++/13/bits/stl_set.h:580:43: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::initializer_list<std::array<int, 3> >'
580 | insert(initializer_list<value_type> __l)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/13/bits/stl_set.h:600:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::insert_return_type std::set<_Key, _Compare, _Alloc>::insert(node_type&&) [with _Key = std::array<int, 3>; _Compare = std::less<std::array<int, 3> >; _Alloc = std::allocator<std::array<int, 3> >; insert_return_type = std::_Rb_tree<std::array<int, 3>, std::array<int, 3>, std::_Identity<std::array<int, 3> >, std::less<std::array<int, 3> >, std::allocator<std::array<int, 3> > >::insert_return_type; node_type = std::_Rb_tree<std::array<int, 3>, std::array<int, 3>, std::_Identity<std::array<int, 3> >, std::less<std::array<int, 3> >, std::allocator<std::array<int, 3> > >::node_type]'
600 | insert(node_type&& __nh)
| ^~~~~~
/usr/include/c++/13/bits/stl_set.h:600:26: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::set<std::array<int, 3> >::node_type&&' {aka 'std::_Rb_tree<std::array<int, 3>, std::array<int, 3>, std::_Identity<std::array<int, 3> >, std::less<std::array<int, 3> >, std::allocator<std::array<int, 3> > >::node_type&&'}
600 | insert(node_type&& __nh)
| ~~~~~~~~~~~~^~~~
/usr/include/c++/13/bits/stl_set.h:605:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::insert(const_iterator, node_type&&) [with _Key = std::array<int, 3>; _Compare = std::less<std::array<int, 3> >; _Alloc = std::allocator<std::array<int, 3> >; iterator = std::_Rb_tree<std::array<int, 3>, std::array<int, 3>, std::_Identity<std::array<int, 3> >, std::less<std::array<int, 3> >, std::allocator<std::array<int, 3> > >::const_iterator; const_iterator = std::_Rb_tree<std::array<int, 3>, std::array<int, 3>, std::_Identity<std::array<int, 3> >, std::less<std::array<int, 3> >, std::allocator<std::array<int, 3> > >::const_iterator; node_type = std::_Rb_tree<std::array<int, 3>, std::array<int, 3>, std::_Identity<std::array<int, 3> >, std::less<std::array<int, 3> >, std::allocator<std::array<int, 3> > >::node_type]'
605 | insert(const_iterator __hint, node_type&& __nh)
| ^~~~~~
/usr/include/c++/13/bits/stl_set.h:605:7: note: candidate expects 2 arguments, 1 provided
triples.cpp:73:58: error: no matching function for call to 'std::set<std::array<int, 3> >::insert(<brace-enclosed initializer list>)'
73 | if (H[i] == (yk - yj) / 2) triples.insert({i, j, k});
| ~~~~~~~~~~~~~~^~~~~~~~~~~
/usr/include/c++/13/bits/stl_set.h:568:9: note: candidate: 'template<class _InputIterator> void std::set<_Key, _Compare, _Alloc>::insert(_InputIterator, _InputIterator) [with _Key = std::array<int, 3>; _Compare = std::less<std::array<int, 3> >; _Alloc = std::allocator<std::array<int, 3> >]'
568 | insert(_InputIterator __first, _InputIterator __last)
| ^~~~~~
/usr/include/c++/13/bits/stl_set.h:568:9: note: template argument deduction/substitution failed:
triples.cpp:73:58: note: candidate expects 2 arguments, 1 provided
73 | if (H[i] == (yk - yj) / 2) triples.insert({i, j, k});
| ~~~~~~~~~~~~~~^~~~~~~~~~~
/usr/include/c++/13/bits/stl_set.h:511:7: note: candidate: 'std::pair<typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key>::other>::const_iterator, bool> std::set<_Key, _Compare, _Alloc>::insert(const value_type&) [with _Key = std::array<int, 3>; _Compare = std::less<std::array<int, 3> >; _Alloc = std::allocator<std::array<int, 3> >; typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key>::other>::const_iterator = std::_Rb_tree<std::array<int, 3>, std::array<int, 3>, std::_Identity<std::array<int, 3> >, std::less<std::array<int, 3> >, std::allocator<std::array<int, 3> > >::const_iterator; typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key>::other = std::allocator<std::array<int, 3> >; typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key> = __gnu_cxx::__alloc_traits<std::allocator<std::array<int, 3> >, std::array<int, 3> >::rebind<std::array<int, 3> >; typename _Allocator::value_type = std::array<int, 3>; value_type = std::array<int, 3>]'
511 | insert(const value_type& __x)
| ^~~~~~
/usr/include/c++/13/bits/stl_set.h:511:32: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const std::set<std::array<int, 3> >::value_type&' {aka 'const std::array<int, 3>&'}
511 | insert(const value_type& __x)
| ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/13/bits/stl_set.h:520:7: note: candidate: 'std::pair<typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key>::other>::const_iterator, bool> std::set<_Key, _Compare, _Alloc>::insert(value_type&&) [with _Key = std::array<int, 3>; _Compare = std::less<std::array<int, 3> >; _Alloc = std::allocator<std::array<int, 3> >; typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key>::other>::const_iterator = std::_Rb_tree<std::array<int, 3>, std::array<int, 3>, std::_Identity<std::array<int, 3> >, std::less<std::array<int, 3> >, std::allocator<std::array<int, 3> > >::const_iterator; typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key>::other = std::allocator<std::array<int, 3> >; typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key> = __gnu_cxx::__alloc_traits<std::allocator<std::array<int, 3> >, std::array<int, 3> >::rebind<std::array<int, 3> >; typename _Allocator::value_type = std::array<int, 3>; value_type = std::array<int, 3>]'
520 | insert(value_type&& __x)
| ^~~~~~
/usr/include/c++/13/bits/stl_set.h:520:27: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::set<std::array<int, 3> >::value_type&&' {aka 'std::array<int, 3>&&'}
520 | insert(value_type&& __x)
| ~~~~~~~~~~~~~^~~
/usr/include/c++/13/bits/stl_set.h:548:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::insert(const_iterator, const value_type&) [with _Key = std::array<int, 3>; _Compare = std::less<std::array<int, 3> >; _Alloc = std::allocator<std::array<int, 3> >; iterator = std::_Rb_tree<std::array<int, 3>, std::array<int, 3>, std::_Identity<std::array<int, 3> >, std::less<std::array<int, 3> >, std::allocator<std::array<int, 3> > >::const_iterator; const_iterator = std::_Rb_tree<std::array<int, 3>, std::array<int, 3>, std::_Identity<std::array<int, 3> >, std::less<std::array<int, 3> >, std::allocator<std::array<int, 3> > >::const_iterator; value_type = std::array<int, 3>]'
548 | insert(const_iterator __position, const value_type& __x)
| ^~~~~~
/usr/include/c++/13/bits/stl_set.h:548:7: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/13/bits/stl_set.h:553:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::insert(const_iterator, value_type&&) [with _Key = std::array<int, 3>; _Compare = std::less<std::array<int, 3> >; _Alloc = std::allocator<std::array<int, 3> >; iterator = std::_Rb_tree<std::array<int, 3>, std::array<int, 3>, std::_Identity<std::array<int, 3> >, std::less<std::array<int, 3> >, std::allocator<std::array<int, 3> > >::const_iterator; const_iterator = std::_Rb_tree<std::array<int, 3>, std::array<int, 3>, std::_Identity<std::array<int, 3> >, std::less<std::array<int, 3> >, std::allocator<std::array<int, 3> > >::const_iterator; value_type = std::array<int, 3>]'
553 | insert(const_iterator __position, value_type&& __x)
| ^~~~~~
/usr/include/c++/13/bits/stl_set.h:553:7: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/13/bits/stl_set.h:580:7: note: candidate: 'void std::set<_Key, _Compare, _Alloc>::insert(std::initializer_list<_Tp>) [with _Key = std::array<int, 3>; _Compare = std::less<std::array<int, 3> >; _Alloc = std::allocator<std::array<int, 3> >]'
580 | insert(initializer_list<value_type> __l)
| ^~~~~~
/usr/include/c++/13/bits/stl_set.h:580:43: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::initializer_list<std::array<int, 3> >'
580 | insert(initializer_list<value_type> __l)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/13/bits/stl_set.h:600:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::insert_return_type std::set<_Key, _Compare, _Alloc>::insert(node_type&&) [with _Key = std::array<int, 3>; _Compare = std::less<std::array<int, 3> >; _Alloc = std::allocator<std::array<int, 3> >; insert_return_type = std::_Rb_tree<std::array<int, 3>, std::array<int, 3>, std::_Identity<std::array<int, 3> >, std::less<std::array<int, 3> >, std::allocator<std::array<int, 3> > >::insert_return_type; node_type = std::_Rb_tree<std::array<int, 3>, std::array<int, 3>, std::_Identity<std::array<int, 3> >, std::less<std::array<int, 3> >, std::allocator<std::array<int, 3> > >::node_type]'
600 | insert(node_type&& __nh)
| ^~~~~~
/usr/include/c++/13/bits/stl_set.h:600:26: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::set<std::array<int, 3> >::node_type&&' {aka 'std::_Rb_tree<std::array<int, 3>, std::array<int, 3>, std::_Identity<std::array<int, 3> >, std::less