# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
128784 | jangwonyoung | Sparklers (JOI17_sparklers) | C++14 | 1933 ms | 6376 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<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define fi first
#define se second
int n,k;
ll t;
ll x[100001];
bool got[100001];
struct mob{
ll fi,se;
};
mob operator+(mob x,mob y){
ll a=max(x.fi,x.fi-x.se+y.fi);
ll b=x.se-x.fi+y.se-y.fi+a;
return (mob){a,b};
}
bool operator<(mob x,mob y){
bool sx=x.fi<x.se,sy=y.fi<y.se;
if(sx!=sy) return sx>sy;
if(x.fi<x.se) return x.fi<y.fi;
return x.se>y.se;
}
priority_queue<pair<mob,int>,vector<pair<mob,int> >,greater<pair<mob,int> > >cave;
int cp[100001],cs[100001];
bool vis[100001];
mob val[100001];
bool solve(ll s){
ll blood=s;
for(int i=1; i<=n ;i++) cp[i]=cs[i]=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... |