# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1177166 | vicvic | Building Bridges (CEOI17_building) | C++20 | 128 ms | 22972 KiB |
#include <iostream>
#include <fstream>
#include <set>
#include <vector>
#include <map>
#include <limits>
using namespace std;
const long double inf=numeric_limits <long double>::infinity();
const long double MAX_SLOPE=1e6+5;
const int NMAX=1e5;
struct line
{
long double slope, intercept;
line (long double _slope, long double _intercept)
{
slope=_slope;
intercept=_intercept;
}
long long operator () (long long x)
{
return slope*x+intercept;
}
};
line ultra_slopper (MAX_SLOPE, 0);
bool operator < (line a, line b)
{
if (a.slope==b.slope)
return a.intercept<b.intercept;
return a.slope<b.slope;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |