Submission #966344

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
9663442024-04-19 17:50:51MisterReaperSplit the sequence (APIO14_sequence)C++17
71 / 100
2033 ms80896 KiB
#include <bits/stdc++.h>
using i64 = long long;
struct line {
i64 a, b;
line(i64 _a, i64 _b) : a(_a), b(_b) {}
long double intersect(line rhs) {
return (long double)(b - rhs.b) / (rhs.a - a);
}
i64 eval(i64 x) {
return a * x + b;
}
bool operator== (line rhs) {
return a == rhs.a && b == rhs.b;
}
};
long double intersect(line a, line b, line c) {
return (a.b - b.b) * (c.a - b.a) >= (b.b - c.b) * (b.a - a.a);
}
namespace std {
std::string to_string(line l) {
return '(' + to_string(l.a) + "x + " + to_string(l.b) + ')';
}
};
#ifdef DEBUG
#include "debug.h"
#else
#define debug(...) void(23)
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#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...