답안 #363965

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
363965 2021-02-07T17:25:23 Z denkendoemeer Golf (JOI17_golf) C++14
컴파일 오류
0 ms 0 KB
#include<bits/stdc++.h>
using namespace std;
#define ll long long
const int inf=1e9;
struct rec
{
    int tip,x,l,r;
    rec(int t,int y,int a,int b):tip(t),x(y),l(a),r(b){}
};
struct comp
{
    vector<int>aux;
    void add(int x)
    {
        aux.push_back(x);
    }
    void build()
    {
        sort(aux.begin(),aux.end());
        aux.erase(unique(aux.begin(),aux.end()),aux.end());
    }
    int poz(int x)
    {
        return lower_bound(aux.begin(),aux.end(),x)-aux.begin()+1;
    }
    int sz()
    {
        return aux.size();
    }
}x3,y3;
bool ok[400005];
int dist[400005];
queue<int>q;
struct ain
{
    set<pair<int,int>>aint[800005];
    ain(){}
    void add(int nod,int st,int dr,int poz)
    {
        st+=400000;
        dr+=400000;
        while(st<=dr){
            if (st%2==1)
                aint[st++].insert({nod,poz});
            if (dr%2==0)
                aint[dr--].insert({nod,poz});
            st=st/2;
            dr=dr/2;
        }
    }
    void rem(int nod,int st,int dr,int poz)
    {
        nod+=400000;
        while(nod){
            for(auto it=aint[nod].lower_bound({st,-inf});it!=aint[nod].end() && it->first<=dr;aint[nod].erase(it++)){
                int nr=it->second;
                if (ok[nr]==0){
                    ok[nr]=1;
                    dist[nr]=poz+1;
                    q.push(nr);
                }
            }
            nod=nod/2;
        }
    }
}ai[2];
vector<rec>r;
int x1[100005],y1[100005],x2[100005],y2[100005];
vector<pair<int,int>>add[400005],del[400005];
vector<int>fir,last;
int n,sx,sy,ex,ey;
void build(int tip)
{
    int i;
    for(i=1;i<=n;i++)
    add[x1[i]].push_back({y1[i],y2[i]}),del[x2[i]].push_back({y1[i],y2[i]});
    set<pair<int,int>>st;
    st.insert({1,1});
    st.insert({y3.sz(),y3.sz()});
    for(i=1;i<=x3.sz();i++){
        for(auto it:del[i]){
            auto it2=st.find(it),l=it2,dr=it2;
            l--;
            dr++;
            r.push_back(rec(tip,i,l->second,dr->first));
            st.erase(it2);
        }
        if (sx==i){
            auto it=st.lower_bound({sy,-inf}),st=it;
            st--;
            fir.push_back(r.size());
            r.push_back(rec(tip,i,st->second,it->first));
        }
        if (ex==i){
            auto it=st.lower_bound({ey,-inf}),st=it;
            st--;
            last.push_back(r.size());
            r.push_back(rec(tip,i,st->second,it->first));
        }
        for(auto it:add[i]){
            st.insert(it);
            auto it2=st.find(it),st=it2,dr=it2;
            st--;
            dr++;
            r.push_back(rec(tip,i,st->second,dr->first));
        }
    }
    for(i=1;i<=x3.sz();i++)
        add[i].clear(),del[i].clear();
    for(i=1;i<=n;i++)
        swap(x1[i],y1[i]),swap(x2[i],y2[i]);
    swap(sx,sy);
    swap(ex,ey);
    swap(x3,y3);
}
int main()
{
    //freopen(".in","r",stdin);
    //freopen(".out","w",stdout);
    int i;
    scanf("%d%d%d%d%d",&sx,&sy,&ex,&ey,&n);
    x3.add(0);
    x3.add(inf);
    x3.add(sx);
    x3.add(ex);
    y3.add(0);
    y3.add(inf);
    y3.add(sy);
    y3.add(ey);
    for(i=1;i<=n;i++)
        scanf("%d%d%d%d",&x1[i],&x2[i],&y1[i],&y2[i]),x3.add(x1[i]),x3.add(x2[i]),y3.add(y1[i]),y3.add(y2[i]);
    x3.build();
    y3.build();
    sx=x3.poz(sx);
    ex=x3.poz(ex);
    sy=y3.poz(sy);
    ey=y3.poz(ey);
    for(i=1;i<=n;i++)
        x1[i]=x3.poz(x1[i]),x2[i]=x3.poz(x2[i]),y1[i]=y3.poz(y1[i]),y2[i]=y3.poz(y2[i]);
    build(0);
    build(1);
    for(i=0;i<r.size();i++)
        ai[r[i].tip].add(r[i].x,r[i].l,r[i].r,i);
    for(auto it:fir){
        if (r[it].tip==0){
            if (ex==r[it].x && ey>=r[it].l && ey<=r[it].r){
                printf("1\n");
                return 0;
            }
        }
        else{
            if (ey==r[it].x && ex>=r[it].l && ex<=r[it].r){
                printf("1\n");
                return 0;
            }
        }
        q.push(it);
        ok[it]=1;
    }
    while(q.size()){
        int nod=q.front();
        q.pop();
        ai[1-r[nod].tip].rem(r[nod].x,r[nod].l,r[nod].r,dist[nod]);
    }
    int ans=inf;
    for(auto it:last)
        if (ok[it])
            ans=min(ans,dist[it]);
    printf("%d\n",ans+1);
return 0;
}

Compilation message

golf.cpp:68:25: error: 'int y1 [100005]' redeclared as different kind of entity
   68 | int x1[100005],y1[100005],x2[100005],y2[100005];
      |                         ^
In file included from /usr/include/features.h:424,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/os_defines.h:39,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/c++config.h:524,
                 from /usr/include/c++/9/cassert:43,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:33,
                 from golf.cpp:1:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:221:1: note: previous declaration 'double y1(double)'
  221 | __MATHCALL (y1,, (_Mdouble_));
      | ^~~~~~~~~~
golf.cpp: In function 'void build(int)':
golf.cpp:76:31: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   76 |     add[x1[i]].push_back({y1[i],y2[i]}),del[x2[i]].push_back({y1[i],y2[i]});
      |                               ^
golf.cpp:76:39: error: no matching function for call to 'std::vector<std::pair<int, int> >::push_back(<brace-enclosed initializer list>)'
   76 |     add[x1[i]].push_back({y1[i],y2[i]}),del[x2[i]].push_back({y1[i],y2[i]});
      |                                       ^
In file included from /usr/include/c++/9/vector:67,
                 from /usr/include/c++/9/queue:61,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:86,
                 from golf.cpp:1:
/usr/include/c++/9/bits/stl_vector.h:1184:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >; std::vector<_Tp, _Alloc>::value_type = std::pair<int, int>]'
 1184 |       push_back(const value_type& __x)
      |       ^~~~~~~~~
/usr/include/c++/9/bits/stl_vector.h:1184:35: note:   no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const value_type&' {aka 'const std::pair<int, int>&'}
 1184 |       push_back(const value_type& __x)
      |                 ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/9/bits/stl_vector.h:1200:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >; std::vector<_Tp, _Alloc>::value_type = std::pair<int, int>]'
 1200 |       push_back(value_type&& __x)
      |       ^~~~~~~~~
/usr/include/c++/9/bits/stl_vector.h:1200:30: note:   no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::vector<std::pair<int, int> >::value_type&&' {aka 'std::pair<int, int>&&'}
 1200 |       push_back(value_type&& __x)
      |                 ~~~~~~~~~~~~~^~~
golf.cpp:76:67: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   76 |     add[x1[i]].push_back({y1[i],y2[i]}),del[x2[i]].push_back({y1[i],y2[i]});
      |                                                                   ^
golf.cpp:76:75: error: no matching function for call to 'std::vector<std::pair<int, int> >::push_back(<brace-enclosed initializer list>)'
   76 |     add[x1[i]].push_back({y1[i],y2[i]}),del[x2[i]].push_back({y1[i],y2[i]});
      |                                                                           ^
In file included from /usr/include/c++/9/vector:67,
                 from /usr/include/c++/9/queue:61,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:86,
                 from golf.cpp:1:
/usr/include/c++/9/bits/stl_vector.h:1184:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >; std::vector<_Tp, _Alloc>::value_type = std::pair<int, int>]'
 1184 |       push_back(const value_type& __x)
      |       ^~~~~~~~~
/usr/include/c++/9/bits/stl_vector.h:1184:35: note:   no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const value_type&' {aka 'const std::pair<int, int>&'}
 1184 |       push_back(const value_type& __x)
      |                 ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/9/bits/stl_vector.h:1200:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >; std::vector<_Tp, _Alloc>::value_type = std::pair<int, int>]'
 1200 |       push_back(value_type&& __x)
      |       ^~~~~~~~~
/usr/include/c++/9/bits/stl_vector.h:1200:30: note:   no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::vector<std::pair<int, int> >::value_type&&' {aka 'std::pair<int, int>&&'}
 1200 |       push_back(value_type&& __x)
      |                 ~~~~~~~~~~~~~^~~
golf.cpp:111:24: warning: pointer to a function used in arithmetic [-Wpointer-arith]
  111 |         swap(x1[i],y1[i]),swap(x2[i],y2[i]);
      |                        ^
golf.cpp:111:25: error: no matching function for call to 'swap(int&, double (&)(double) throw ())'
  111 |         swap(x1[i],y1[i]),swap(x2[i],y2[i]);
      |                         ^
In file included from /usr/include/c++/9/complex:45,
                 from /usr/include/c++/9/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
                 from golf.cpp:1:
/usr/include/c++/9/sstream:849:5: note: candidate: 'template<class _CharT, class _Traits, class _Allocator> void std::__cxx11::swap(std::__cxx11::basic_stringbuf<_CharT, _Traits, _Alloc>&, std::__cxx11::basic_stringbuf<_CharT, _Traits, _Alloc>&)'
  849 |     swap(basic_stringbuf<_CharT, _Traits, _Allocator>& __x,
      |     ^~~~
/usr/include/c++/9/sstream:849:5: note:   template argument deduction/substitution failed:
golf.cpp:111:25: note:   mismatched types 'std::__cxx11::basic_stringbuf<_CharT, _Traits, _Alloc>' and 'int'
  111 |         swap(x1[i],y1[i]),swap(x2[i],y2[i]);
      |                         ^
In file included from /usr/include/c++/9/complex:45,
                 from /usr/include/c++/9/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
                 from golf.cpp:1:
/usr/include/c++/9/sstream:856:5: note: candidate: 'template<class _CharT, class _Traits, class _Allocator> void std::__cxx11::swap(std::__cxx11::basic_istringstream<_CharT, _Traits, _Allocator>&, std::__cxx11::basic_istringstream<_CharT, _Traits, _Allocator>&)'
  856 |     swap(basic_istringstream<_CharT, _Traits, _Allocator>& __x,
      |     ^~~~
/usr/include/c++/9/sstream:856:5: note:   template argument deduction/substitution failed:
golf.cpp:111:25: note:   mismatched types 'std::__cxx11::basic_istringstream<_CharT, _Traits, _Allocator>' and 'int'
  111 |         swap(x1[i],y1[i]),swap(x2[i],y2[i]);
      |                         ^
In file included from /usr/include/c++/9/complex:45,
                 from /usr/include/c++/9/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
                 from golf.cpp:1:
/usr/include/c++/9/sstream:863:5: note: candidate: 'template<class _CharT, class _Traits, class _Allocator> void std::__cxx11::swap(std::__cxx11::basic_ostringstream<_CharT, _Traits, _Allocator>&, std::__cxx11::basic_ostringstream<_CharT, _Traits, _Allocator>&)'
  863 |     swap(basic_ostringstream<_CharT, _Traits, _Allocator>& __x,
      |     ^~~~
/usr/include/c++/9/sstream:863:5: note:   template argument deduction/substitution failed:
golf.cpp:111:25: note:   mismatched types 'std::__cxx11::basic_ostringstream<_CharT, _Traits, _Allocator>' and 'int'
  111 |         swap(x1[i],y1[i]),swap(x2[i],y2[i]);
      |                         ^
In file included from /usr/include/c++/9/complex:45,
                 from /usr/include/c++/9/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
                 from golf.cpp:1:
/usr/include/c++/9/sstream:870:5: note: candidate: 'template<class _CharT, class _Traits, class _Allocator> void std::__cxx11::swap(std::__cxx11::basic_stringstream<_CharT, _Traits, _Allocator>&, std::__cxx11::basic_stringstream<_CharT, _Traits, _Allocator>&)'
  870 |     swap(basic_stringstream<_CharT, _Traits, _Allocator>& __x,
      |     ^~~~
/usr/include/c++/9/sstream:870:5: note:   template argument deduction/substitution failed:
golf.cpp:111:25: note:   mismatched types 'std::__cxx11::basic_stringstream<_CharT, _Traits, _Allocator>' and 'int'
  111 |         swap(x1[i],y1[i]),swap(x2[i],y2[i]);
      |                         ^
In file included from /usr/include/c++/9/regex:62,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:110,
                 from golf.cpp:1:
/usr/include/c++/9/bits/regex.h:844:5: note: candidate: 'template<class _Ch_type, class _Rx_traits> void std::__cxx11::swap(std::__cxx11::basic_regex<_Ch_type, _Rx_traits>&, std::__cxx11::basic_regex<_Ch_type, _Rx_traits>&)'
  844 |     swap(basic_regex<_Ch_type, _Rx_traits>& __lhs,
      |     ^~~~
/usr/include/c++/9/bits/regex.h:844:5: note:   template argument deduction/substitution failed:
golf.cpp:111:25: note:   mismatched types 'std::__cxx11::basic_regex<_Ch_type, _Rx_traits>' and 'int'
  111 |         swap(x1[i],y1[i]),swap(x2[i],y2[i]);
      |                         ^
In file included from /usr/include/c++/9/regex:62,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:110,
                 from golf.cpp:1:
/usr/include/c++/9/bits/regex.h:2029:5: note: candidate: 'template<class _Bi_iter, class _Alloc> void std::__cxx11::swap(std::__cxx11::match_results<_BiIter, _Alloc>&, std::__cxx11::match_results<_BiIter, _Alloc>&)'
 2029 |     swap(match_results<_Bi_iter, _Alloc>& __lhs,
      |     ^~~~
/usr/include/c++/9/bits/regex.h:2029:5: note:   template argument deduction/substitution failed:
golf.cpp:111:25: note:   mismatched types 'std::__cxx11::match_results<_BiIter, _Alloc>' and 'int'
  111 |         swap(x1[i],y1[i]),swap(x2[i],y2[i]);
      |                         ^
In file included from /usr/include/c++/9/bits/nested_exception.h:40,
                 from /usr/include/c++/9/exception:144,
                 from /usr/include/c++/9/ios:39,
                 from /usr/include/c++/9/istream:38,
                 from /usr/include/c++/9/sstream:38,
                 from /usr/include/c++/9/complex:45,
                 from /usr/include/c++/9/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
                 from golf.cpp:1:
/usr/include/c++/9/bits/move.h:182:5: note: candidate: 'template<class _Tp> typename std::enable_if<std::__and_<std::__not_<std::__is_tuple_like<_Tp> >, std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> >::value>::type std::swap(_Tp&, _Tp&)'
  182 |     swap(_Tp& __a, _Tp& __b)
      |     ^~~~
/usr/include/c++/9/bits/move.h:182:5: note:   template argument deduction/substitution failed:
golf.cpp:111:25: note:   deduced conflicting types for parameter '_Tp' ('int' and 'double(double) throw ()' {aka 'double(double)'})
  111 |         swap(x1[i],y1[i]),swap(x2[i],y2[i]);
      |                         ^
In file included from /usr/include/c++/9/bits/nested_exception.h:40,
                 from /usr/include/c++/9/exception:144,
                 from /usr/include/c++/9/ios:39,
                 from /usr/include/c++/9/istream:38,
                 from /usr/include/c++/9/sstream:38,
                 from /usr/include/c++/9/complex:45,
                 from /usr/include/c++/9/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
                 from golf.cpp:1:
/usr/include/c++/9/bits/move.h:205:5: note: candidate: 'template<class _Tp, long unsigned int _Nm> typename std::enable_if<std::__is_swappable<_Tp>::value>::type std::swap(_Tp (&)[_Nm], _Tp (&)[_Nm])'
  205 |     swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm])
      |     ^~~~
/usr/include/c++/9/bits/move.h:205:5: note:   template argument deduction/substitution failed:
golf.cpp:111:25: note:   mismatched types '_Tp [_Nm]' and 'int'
  111 |         swap(x1[i],y1[i]),swap(x2[i],y2[i]);
      |                         ^
In file included from /usr/include/c++/9/bits/stl_algobase.h:64,
                 from /usr/include/c++/9/bits/char_traits.h:39,
                 from /usr/include/c++/9/ios:40,
                 from /usr/include/c++/9/istream:38,
                 from /usr/include/c++/9/sstream:38,
                 from /usr/include/c++/9/complex:45,
                 from /usr/include/c++/9/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
                 from golf.cpp:1:
/usr/include/c++/9/bits/stl_pair.h:495:5: note: candidate: 'template<class _T1, class _T2> void std::swap(std::pair<_T1, _T2>&, std::pair<_T1, _T2>&)'
  495 |     swap(pair<_T1, _T2>& __x, pair<_T1, _T2>& __y)
      |     ^~~~
/usr/include/c++/9/bits/stl_pair.h:495:5: note:   template argument deduction/substitution failed:
golf.cpp:111:25: note:   mismatched types 'std::pair<_T1, _T2>' and 'int'
  111 |         swap(x1[i],y1[i]),swap(x2[i],y2[i]);
      |                         ^
In file included from /usr/include/c++/9/string:55,
                 from /usr/include/c++/9/bits/locale_classes.h:40,
                 from /usr/include/c++/9/bits/ios_base.h:41,
                 from /usr/include/c++/9/ios:42,
                 from /usr/include/c++/9/istream:38,
                 from /usr/include/c++/9/sstream:38,
                 from /usr/include/c++/9/complex:45,
                 from /usr/include/c++/9/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
                 from golf.cpp:1:
/usr/include/c++/9/bits/basic_string.h:6378:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> void std::swap(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&)'
 6378 |     swap(basic_string<_CharT, _Traits, _Alloc>& __lhs,
      |     ^~~~
/usr/include/c++/9/bits/basic_string.h:6378:5: note:   template argument deduction/substitution failed:
golf.cpp:111:25: note:   mismatched types 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>' and 'int'
  111 |         swap(x1[i],y1[i]),swap(x2[i],y2[i]);
      |                         ^
In file included from /usr/include/c++/9/deque:67,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:68,
                 from golf.cpp:1:
/usr/include/c++/9/bits/stl_deque.h:2366:5: note: candidate: 'template<class _Tp, class _Alloc> void std::swap(std::deque<_Tp, _Alloc>&, std::deque<_Tp, _Alloc>&)'
 2366 |     swap(deque<_Tp,_Alloc>& __x, deque<_Tp,_Alloc>& __y)
      |     ^~~~
/usr/include/c++/9/bits/stl_deque.h:2366:5: note:   template argument deduction/substitution failed:
golf.cpp:111:25: note:   mismatched types 'std::deque<_Tp, _Alloc>' and 'int'
  111 |         swap(x1[i],y1[i]),swap(x2[i],y2[i]);
      |                         ^
In file included from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:70,
                 from golf.cpp:1:
/usr/include/c++/9/fstream:1264:5: note: candidate: 'template<class _CharT, class _Traits> void std::swap(std::basic_filebuf<_CharT, _Traits>&, std::basic_filebuf<_CharT, _Traits>&)'
 1264 |     swap(basic_filebuf<_CharT, _Traits>& __x,
      |     ^~~~
/usr/include/c++/9/fstream:1264:5: note:   template argument deduction/substitution failed:
golf.cpp:111:25: note:   mismatched types 'std::basic_filebuf<_CharT, _Traits>' and 'int'
  111 |         swap(x1[i],y1[i]),swap(x2[i],y2[i]);
      |                         ^
In file included from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:70,
                 from golf.cpp:1:
/usr/include/c++/9/fstream:1271:5: note: candidate: 'template<class _CharT, class _Traits> void std::swap(std::basic_ifstream<_CharT, _Traits>&, std::basic_ifstream<_CharT, _Traits>&)'
 1271 |     swap(basic_ifstream<_CharT, _Traits>& __x,
      |     ^~~~
/usr/include/c++/9/fstream:1271:5: note:   template argument deduction/substitution failed:
golf.cpp:111:25: note:   mismatched types 'std::basic_ifstream<_CharT, _Traits>' and 'int'
  111 |         swap(x1[i],y1[i]),swap(x2[i],y2[i]);
      |                         ^
In file included from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:70,
                 from golf.cpp:1:
/usr/include/c++/9/fstream:1278:5: note: candidate: 'template<class _CharT, class _Traits> void std::swap(std::basic_ofstream<_CharT, _Traits>&, std::basic_ofstream<_CharT, _Traits>&)'
 1278 |     swap(basic_ofstream<_CharT, _Traits>& __x,
      |     ^~~~
/usr/include/c++/9/fstream:1278:5: note:   template argument deduction/substitution failed:
golf.cpp:111:25: note:   mismatched types 'std::basic_ofstream<_CharT, _Traits>' and 'int'
  111 |         swap(x1[i],y1[i]),swap(x2[i],y2[i]);
      |                         ^
In file included from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:70,
                 from golf.cpp:1:
/usr/include/c++/9/fstream:1285:5: note: candidate: 'template<class _CharT, class _Traits> void std::swap(std::basic_fstream<_CharT, _Traits>&, std::basic_fstream<_CharT, _Traits>&)'
 1285 |     swap(basic_fstream<_CharT, _Traits>& __x,
      |     ^~~~
/usr/include/c++/9/fstream:1285:5: note:   template argument deduction/substitution failed:
golf.cpp:111:25: note:   mismatched types 'std::basic_fstream<_CharT, _Traits>' and 'int'
  111 |         swap(x1[i],y1[i]),swap(x2[i],y2[i]);
      |                         ^
In file included from /usr/include/c++/9/tuple:39,
                 from /usr/include/c++/9/functional:54,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:71,
                 from golf.cpp:1:
/usr/include/c++/9/array:294:5: note: candidate: 'template<class _Tp, long unsigned int _Nm> void std::swap(std::array<_Tp, _Nm>&, std::array<_Tp, _Nm>&)'
  294 |     swap(array<_Tp, _Nm>& __one, array<_Tp, _Nm>& __two)
      |     ^~~~
/usr/include/c++/9/array:294:5: note:   template argument deduction/substitution failed:
golf.cpp:111:25: note:   mismatched types 'std::array<_Tp, _Nm>' and 'int'
  111 |         swap(x1[i],y1[i]),swap(x2[i],y2[i]);
      |                         ^
In file included from /usr/include/c++/9/functional:54,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:71,
                 from golf.cpp:1:
/usr/include/c++/9/tuple:1624:5: note: candidate: 'template<class ... _Elements> void std::swap(std::tuple<_Tps ...>&, std::tuple<_Tps ...>&)'
 1624 |     swap(tuple<_Elements...>& __x, tuple<_Elements...>& __y)
      |     ^~