# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1119172 | 2024-11-26 16:59:59 | epicci23 | Aliens (IOI16_aliens) | C++17 | Compilation error | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include "bits/stdc++.h"
#define ll long long
#define all(v) v.begin() , v.end()
#define sz(a) (ll)a.size()
using namespace std;
const ll N = (ll) 1e6 + 5;
const ll INF = (ll) 1e18 + 5;
const ll INF2 = (ll) 1e9 + 5;
vector<array<ll,2>> v;
struct Line{
ll sl,cn,tag;
Line(ll _a,ll _b, ll _tag){sl = _a, cn = _b, tag = _tag;}
inline ll get_val(ll _x){return _x * sl + cn;}
};
struct LiChao{
vector<Line> seg;
LiChao(ll _m){
seg.resize(4*_m+5);
for(int i = 0 ; i < 4*_m + 5 ; i++) seg[i] = Line(0,-INF);
}
void add(ll rt,ll l,ll r,Line u){
ll mid = (l+r)/2;
if(u.get_val(mid) >= seg[rt].get_val(mid)) swap(seg[rt],u);
if(l==r) return;
if(u.sl >= seg[rt].sl) add(rt*2+1,mid+1,r,u);
else add(rt*2,l,mid,u);
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Compilation message (stderr)
aliens.cpp: In constructor 'LiChao::LiChao(long long int)': aliens.cpp:23:62: error: no matching function for call to 'Line::Line(int, long long int)' 23 | for(int i = 0 ; i < 4*_m + 5 ; i++) seg[i] = Line(0,-INF); | ^ aliens.cpp:15:4: note: candidate: 'Line::Line(long long int, long long int, long long int)' 15 | Line(ll _a,ll _b, ll _tag){sl = _a, cn = _b, tag = _tag;} | ^~~~ aliens.cpp:15:4: note: candidate expects 3 arguments, 2 provided aliens.cpp:13:8: note: candidate: 'constexpr Line::Line(const Line&)' 13 | struct Line{ | ^~~~ aliens.cpp:13:8: note: candidate expects 1 argument, 2 provided aliens.cpp:13:8: note: candidate: 'constexpr Line::Line(Line&&)' aliens.cpp:13:8: note: candidate expects 1 argument, 2 provided aliens.cpp: In member function 'Line LiChao::get_max(long long int, long long int, long long int, long long int)': aliens.cpp:34:27: error: no matching function for call to 'Line::Line()' 34 | Line res = seg[rt] , curi; | ^~~~ aliens.cpp:15:4: note: candidate: 'Line::Line(long long int, long long int, long long int)' 15 | Line(ll _a,ll _b, ll _tag){sl = _a, cn = _b, tag = _tag;} | ^~~~ aliens.cpp:15:4: note: candidate expects 3 arguments, 0 provided aliens.cpp:13:8: note: candidate: 'constexpr Line::Line(const Line&)' 13 | struct Line{ | ^~~~ aliens.cpp:13:8: note: candidate expects 1 argument, 0 provided aliens.cpp:13:8: note: candidate: 'constexpr Line::Line(Line&&)' aliens.cpp:13:8: note: candidate expects 1 argument, 0 provided aliens.cpp: In function 'std::array<long long int, 2> wqs_binary_search(long long int)': aliens.cpp:47:17: error: 'n' was not declared in this scope 47 | vector<ll> dp(n+5,INF),Use(n+5,INF); | ^ aliens.cpp:55:8: warning: unused variable 'a' [-Wunused-variable] 55 | ll a = v[i][0] , b = v[i][1]; | ^ aliens.cpp: In function 'long long int take_photos(int, int, int, std::vector<int>, std::vector<int>)': aliens.cpp:71:14: warning: unused variable 'm' [-Wunused-variable] 71 | ll n = _n, m = _m, k = _k,ans = INF; | ^ aliens.cpp:71:29: warning: unused variable 'ans' [-Wunused-variable] 71 | ll n = _n, m = _m, k = _k,ans = INF; | ^~~ In file included from /usr/include/c++/10/bits/alloc_traits.h:33, from /usr/include/c++/10/ext/alloc_traits.h:34, from /usr/include/c++/10/bits/basic_string.h:40, from /usr/include/c++/10/string:55, from /usr/include/c++/10/bits/locale_classes.h:40, from /usr/include/c++/10/bits/ios_base.h:41, from /usr/include/c++/10/ios:42, from /usr/include/c++/10/istream:38, from /usr/include/c++/10/sstream:38, from /usr/include/c++/10/complex:45, from /usr/include/c++/10/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54, from aliens.cpp:1: /usr/include/c++/10/bits/stl_construct.h: In instantiation of 'void std::_Construct(_Tp*, _Args&& ...) [with _Tp = Line; _Args = {}]': /usr/include/c++/10/bits/stl_uninitialized.h:567:18: required from 'static _ForwardIterator std::__uninitialized_default_n_1<_TrivialValueType>::__uninit_default_n(_ForwardIterator, _Size) [with _ForwardIterator = Line*; _Size = long unsigned int; bool _TrivialValueType = false]' /usr/include/c++/10/bits/stl_uninitialized.h:623:20: required from '_ForwardIterator std::__uninitialized_default_n(_ForwardIterator, _Size) [with _ForwardIterator = Line*; _Size = long unsigned int]' /usr/include/c++/10/bits/stl_uninitialized.h:685:44: required from '_ForwardIterator std::__uninitialized_default_n_a(_ForwardIterator, _Size, std::allocator<_Tp>&) [with _ForwardIterator = Line*; _Size = long unsigned int; _Tp = Line]' /usr/include/c++/10/bits/vector.tcc:627:35: required from 'void std::vector<_Tp, _Alloc>::_M_default_append(std::vector<_Tp, _Alloc>::size_type) [with _Tp = Line; _Alloc = std::allocator<Line>; std::vector<_Tp, _Alloc>::size_type = long unsigned int]' /usr/include/c++/10/bits/stl_vector.h:940:4: required from 'void std::vector<_Tp, _Alloc>::resize(std::vector<_Tp, _Alloc>::size_type) [with _Tp = Line; _Alloc = std::allocator<Line>; std::vector<_Tp, _Alloc>::size_type = long unsigned int]' aliens.cpp:22:23: required from here /usr/include/c++/10/bits/stl_construct.h:109:7: error: no matching function for call to 'Line::Line()' 109 | { ::new(static_cast<void*>(__p)) _Tp(std::forward<_Args>(__args)...); } | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ aliens.cpp:15:4: note: candidate: 'Line::Line(long long int, long long int, long long int)' 15 | Line(ll _a,ll _b, ll _tag){sl = _a, cn = _b, tag = _tag;} | ^~~~ aliens.cpp:15:4: note: candidate expects 3 arguments, 0 provided aliens.cpp:13:8: note: candidate: 'constexpr Line::Line(const Line&)' 13 | struct Line{ | ^~~~ aliens.cpp:13:8: note: candidate expects 1 argument, 0 provided aliens.cpp:13:8: note: candidate: 'constexpr Line::Line(Line&&)' aliens.cpp:13:8: note: candidate expects 1 argument, 0 provided