제출 #1011993

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
10119932024-07-01 13:43:31baodeptrai수열 (APIO14_sequence)C++14
0 / 100
4 ms2140 KiB
#include <bits/stdc++.h>
using namespace std;
#define endl "\n"
#define ll long long
template <bool kGetMin = false>
struct LineDeque
{
using T = long long;
struct Line
{
mutable T a, b, p;
bool operator<(const Line &other) const { return a < other.a; }
bool operator<(T x) const { return p < x; }
T eval(T x) const { return a * x + b; }
};
using Set = std::deque<pair<Line, int>>;
using Iterator = typename Set::iterator;
Set s;
static const T inf = std::numeric_limits<T>::max();
// doubles: inf = 1/.0, div(a, b) = a / b
T div(T a, T b)
{ // floored division
return a / b - ((a ^ b) < 0 && a % b);
}
bool intersect(Line &x, Line &y)
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

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

sequence.cpp: In member function 'void LineDeque<kGetMin>::add_line_increasing_slope(LineDeque<kGetMin>::T, LineDeque<kGetMin>::T, int)':
sequence.cpp:70:12: warning: 'if constexpr' only available with '-std=c++17' or '-std=gnu++17'
   70 |         if constexpr (kGetMin)
      |            ^~~~~~~~~
sequence.cpp: In member function 'void LineDeque<kGetMin>::add_line_decreasing_slope(LineDeque<kGetMin>::T, LineDeque<kGetMin>::T, int)':
sequence.cpp:82:12: warning: 'if constexpr' only available with '-std=c++17' or '-std=gnu++17'
   82 |         if constexpr (kGetMin)
      |            ^~~~~~~~~
sequence.cpp: In member function 'LineDeque<kGetMin>::T LineDeque<kGetMin>::query(LineDeque<kGetMin>::T)':
sequence.cpp:97:12: warning: 'if constexpr' only available with '-std=c++17' or '-std=gnu++17'
   97 |         if constexpr (kGetMin)
      |            ^~~~~~~~~
sequence.cpp: In member function 'std::pair<long long int, int> LineDeque<kGetMin>::query_increasing(LineDeque<kGetMin>::T)':
sequence.cpp:113:12: warning: 'if constexpr' only available with '-std=c++17' or '-std=gnu++17'
  113 |         if constexpr (kGetMin)
      |            ^~~~~~~~~
sequence.cpp: In member function 'std::pair<long long int, int> LineDeque<kGetMin>::query_decreasing(LineDeque<kGetMin>::T)':
sequence.cpp:129:12: warning: 'if constexpr' only available with '-std=c++17' or '-std=gnu++17'
  129 |         if constexpr (kGetMin)
      |            ^~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...