# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1130022 | Math4Life2020 | Two Currencies (JOI23_currencies) | C++20 | 1376 ms | 295212 KiB |
#include <bits/stdc++.h>
using namespace std;
using ll = long long; using pii = pair<ll,ll>;
const ll Nm = 1e5+5; const ll E = 18;
const ll INF = 1e9;
struct Node {
//map<ll,ll> m0; //cost->number
//map<ll,pii> mps; //aggregate: cost -> {# <=cost, val <=cost}
vector<pair<int,int>> m0;
vector<pair<pair<int,int>,long long>> mps;
ll ncp = 0;
void prc() {
ll n0=0; ll v0=0;
//mps[-INF]={0,0};
mps.push_back({{-INF,0},0LL});
for (pii p0: m0) {
ll c1 = p0.first; ll n1 = p0.second;
n0+=n1; v0+=n1*c1;
//mps[c1]={n0,v0};
mps.push_back({{c1,n0},v0});
}
}
Node(){}
Node(vector<ll> v1) {
map<ll,ll> mtest;
for (ll x: v1) {
mtest[x]++;
}
ncp = v1.size();
# | 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... |