# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
19117 | tlwpdus | Be Two Bees (OJUZ10_b2b) | C++98 | 945 ms | 2648 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.
#include<stdio.h>
#include<algorithm>
using namespace std;
typedef long long ll;
typedef pair<ll,ll> pll;
#define h first
#define t second
const ll INF = 1LL<<60;
int n;
pll arr[100100];
double x;
ll S;
bool cmp(pll a, pll b) {
return x/a.t+a.h<x/b.t+b.h;
}
pll m1, m2;
int t1, t2;
bool ok() {
m1=pll(-1000000,1000000), m2 = pll(-1000000,1000000);
int i;
for (i=0;i<n;i++) {
if (cmp(m1,arr[i])) m2=m1,m1=arr[i],t2=t1,t1=i;
else if (cmp(m2,arr[i])) m2=arr[i],t2=i;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |