# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
354302 | CaroLinda | Palembang Bridges (APIO15_bridge) | C++14 | 347 ms | 15316 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#define ll long long
#define all(x) x.begin(),x.end()
#define sz(x) (int)(x.size() )
const int MAXN = 1e5+10 ;
using namespace std ;
int N , K ;
long long ans ;
vector<ll> solve(vector< pair<int,int> > v )
{
multiset<int> s[2] ;
ll soma[2] = {0,0} ;
vector<ll> dp( sz(v) , 0 ) ;
s[0].insert( v[0].first ) ; soma[0] = (ll)v[0].first ;
s[1].insert( v[0].second ) ; soma[1] = (ll)v[0].second ;
dp[0] = soma[1] - soma[0] ;
for(int i = 1 ; i < sz(v) ; i++ )
{
for(int e : { v[i].first, v[i].second } )
{
if( e < *s[1].begin() ) s[0].insert(e) , soma[0] += (ll)e ;
else s[1].insert(e) , soma[1] += (ll)e ;
}
컴파일 시 표준 에러 (stderr) 메시지
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |