# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
128098 | ekrem | Detecting Molecules (IOI16_molecules) | C++98 | 82 ms | 6380 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "molecules.h"
#include <bits/stdc++.h>
#define st first
#define nd second
#define mp make_pair
#define pb push_back
#define sol (k+k)
#define sag (k+k+1)
#define orta ((bas+son)/2)
#define coc g[node][i]
#define mod 1000000007
#define inf 1000000009
#define N 1000005
using namespace std;
typedef long long ll;
typedef pair < int , int > ii;
typedef vector < int > vi;
int n;
vector < ii > x;
vi find_subset(int l, int u, vi w) {
vi ans;
for(int i = 0; i < w.size(); i++)
x.pb(mp(w[i], i));
sort(x.begin(), x.end());
sort(w.begin(), w.end());
// for(int i = 0; i < w.size(); i++)cout << w[i] << " ";cout << endl;
ll top = 0, bas = 0;
for(int i = 0; i < w.size(); i++){
top += w[i];
while(top > u){
top -= w[bas];
bas++;
}
// cout << bas << " " << i << " = " << top << endl;
if(top >= l and top <= u){
for(int j = bas; j <= i; j++)
ans.pb(x[j].nd);
return ans;
}
}
return ans;
}
컴파일 시 표준 에러 (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... |