| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 297848 | Muhammetali | Detecting Molecules (IOI16_molecules) | C++11 | 117 ms | 768 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "molecules.h"
#include <bits/stdc++.h>
#define mp make_pair
#define f first
#define s second
#define sz(x) (int)(x).size()
#define rsz resize
#define ins insert
#define ft front()
#define bk back()
#define pf push_front
#define pb push_back
#define eb emplace_back
#define lb lower_bound
#define ub upper_bound
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int,int> pi;
typedef pair<ll,ll> pl;
typedef vector<int> vi;
typedef vector<bool> vb;
typedef vector<ll> vl;
typedef vector<pi> vpi;
typedef vector<pl> vpl;
vi find_subset(int l, int u, vi w)
{
int n=sz(w);
int jem[n]={0};
vpl par;
for (int i=0;i<n;i++)par.pb({w[i],i});
for (int i=0;i<n-1;i++)
{
for (int j=i;j<n-1;j++)
{
if (par[j].f>par[j+1].f)
{
swap(par[j],par[j+1]);
}
}
}
vi res;
jem[-1]=0;
jem[0]=par[0].f;
for (int i=1;i<n;i++) jem[i]+=jem[i-1]+par[i].f;
int ff=0,ss=0;
while(ff<n && ss<n)
{
ll g=jem[ss]-jem[ff-1];
if (g>=l && g<=u)
{
for (int i=ff;i<=ss;i++)
{
res.pb(par[i].s);
}
return res;
}
if (g>u)ff++;
if (g<l)ss++;
}
return res;
}
컴파일 시 표준 에러 (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... | ||||
