# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
424181 | MOUF_MAHMALAT | Detecting Molecules (IOI16_molecules) | C++14 | 1 ms | 204 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "molecules.h"
#include<bits/stdc++.h>
#define all(s) s.begin(),s.end()
using namespace std;
typedef int ll;
multiset<ll>s;
vector<ll>v;
pair<ll,ll>p[200009];
ll sum,id;
vector<int>find_subset(int l, int u, vector<int> w)
{
for(ll i=0; i<w.size(); i++)
{
sum+=w[i];
s.insert(w[i]);
p[i]= {w[i],i};
}
while(sum>u)
{
auto z=s.lower_bound(sum-u);
if(z==s.end())
z--;
sum-=*z;
s.erase(z);
//cout<<sum<<endl;
}
if(sum<l)
return v;
sort(p,p+w.size());
for(auto x:s)
{
while(x!=p[id].first)
id++;
v.push_back(p[id].second);
id++;
}
sort(all(v));
return v;
}
컴파일 시 표준 에러 (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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |