제출 #995109

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
9951092024-06-08 13:02:29yeediot마상시합 토너먼트 (IOI12_tournament)C++17
컴파일 에러
0 ms0 KiB
#include<bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
template<typename T> using Tree = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
#define pii pair<long long,long long>
#define F first
#define S second
#define pb push_back
#define rep(i,n) for(int i = 0; i < n; ++i)
#define rep1(i,n) for(int i = 1; i <= n; ++i)
#define rev(i,s,e) for(int i = s; i >= e; --i)
#define trav(i,a) for(auto &i : a)
void setio(){
freopen("/Users/iantsai/cpp/input.txt","r",stdin);
freopen("/Users/iantsai/cpp/output.txt","w",stdout);
}
const long long mxn = (1<<17)+10;
const long long inf=1e18;
long long n, m, rk, l[mxn], r[mxn], nl[mxn], nr[mxn], a[mxn];
struct BIT{
long long bit[mxn];
void init(){
for(long long i=0;i<mxn;i++){
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

컴파일 시 표준 에러 (stderr) 메시지

tournament.cpp: In member function 'void segtree::build(long long int, long long int, long long int)':
tournament.cpp:69:23: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
   69 |         long long mm=l+r>>1;
      |                      ~^~
tournament.cpp: In member function 'void segtree::m(long long int, long long int, long long int, long long int, std::pair<long long int, long long int>)':
tournament.cpp:81:25: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
   81 |         long long mm = l+r>>1;
      |                        ~^~
tournament.cpp: In member function 'segtree::data segtree::q(long long int, long long int, long long int, long long int, long long int)':
tournament.cpp:99:25: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
   99 |         long long mm = l+r>>1;
      |                        ~^~
tournament.cpp: In function 'int GetBestPosition(int, int, int, int*, int*, int*)':
tournament.cpp:155:23: error: 'struct std::pair<long long int, long long int>' has no member named 'ff'
  155 |         os.insert({pl.ff,pr.ss});
      |                       ^~
tournament.cpp:155:29: error: 'struct std::pair<long long int, long long int>' has no member named 'ss'
  155 |         os.insert({pl.ff,pr.ss});
      |                             ^~
tournament.cpp:155:32: error: cannot convert '<brace-enclosed initializer list>' to '__gnu_pbds::detail::rb_tree_set<std::pair<long long int, long long int>, __gnu_pbds::null_type, std::less<std::pair<long long int, long long int> >, __gnu_pbds::detail::tree_traits<std::pair<long long int, long long int>, __gnu_pbds::null_type, std::less<std::pair<long long int, long long int> >, __gnu_pbds::tree_order_statistics_node_update, __gnu_pbds::rb_tree_tag, std::allocator<char> >, std::allocator<char> >::const_reference' {aka 'const std::pair<long long int, long long int>&'}
  155 |         os.insert({pl.ff,pr.ss});
      |                                ^
In file included from /usr/include/c++/10/ext/pb_ds/detail/rb_tree_map_/rb_tree_.hpp:235,
                 from /usr/include/c++/10/ext/pb_ds/detail/container_base_dispatch.hpp:85,
                 from /usr/include/c++/10/ext/pb_ds/assoc_container.hpp:48,
                 from tournament.cpp:4:
/usr/include/c++/10/ext/pb_ds/detail/rb_tree_map_/insert_fn_imps.hpp:46:24: note:   initializing argument 1 of 'std::pair<typename __gnu_pbds::detail::bin_search_tree_set<Key, Mapped, Cmp_Fn, Node_And_It_Traits, _Alloc>::point_iterator, bool> __gnu_pbds::detail::rb_tree_set<Key, Mapped, Cmp_Fn, Node_And_It_Traits, _Alloc>::insert(__gnu_pbds::detail::rb_tree_set<Key, Mapped, Cmp_Fn, Node_And_It_Traits, _Alloc>::const_reference) [with Key = std::pair<long long int, long long int>; Mapped = __gnu_pbds::null_type; Cmp_Fn = std::less<std::pair<long long int, long long int> >; Node_And_It_Traits = __gnu_pbds::detail::tree_traits<std::pair<long long int, long long int>, __gnu_pbds::null_type, std::less<std::pair<long long int, long long int> >, __gnu_pbds::tree_order_statistics_node_update, __gnu_pbds::rb_tree_tag, std::allocator<char> >; _Alloc = std::allocator<char>; typename __gnu_pbds::detail::bin_search_tree_set<Key, Mapped, Cmp_Fn, Node_And_It_Traits, _Alloc>::point_iterator = __gnu_pbds::detail::bin_search_tree_const_it_<__gnu_pbds::detail::rb_tree_node_<std::pair<long long int, long long int>, long unsigned int, std::allocator<char> >*, std::pair<long long int, long long int>, std::pair<long long int, long long int>*, const std::pair<long long int, long long int>*, std::pair<long long int, long long int>&, const std::pair<long long int, long long int>&, true, std::allocator<char> >; __gnu_pbds::detail::rb_tree_set<Key, Mapped, Cmp_Fn, Node_And_It_Traits, _Alloc>::const_reference = const std::pair<long long int, long long int>&]'
   46 | insert(const_reference r_value)
      |        ~~~~~~~~~~~~~~~~^~~~~~~
tournament.cpp:181:29: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
  181 |             long long mm=l+r+1>>1;
      |                          ~~~^~
tournament.cpp:179:27: warning: unused variable 'ck' [-Wunused-variable]
  179 |         long long l=1,r=m,ck=0;
      |                           ^~
tournament.cpp: In function 'void setio()':
tournament.cpp:21:12: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   21 |     freopen("/Users/iantsai/cpp/input.txt","r",stdin);
      |     ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tournament.cpp:22:12: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   22 |     freopen("/Users/iantsai/cpp/output.txt","w",stdout);
      |     ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~