| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 299377 | APROHACK | Detecting Molecules (IOI16_molecules) | C++14 | 5 ms | 384 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "molecules.h"
#include <bits/stdc++.h>
#define PB push_back
using namespace std;
vector<int> find_subset(int l, int u, vector<int> w) {
vector<int>respuesta;
//sort(w.begin(), w.end());
long long sum=0, n=w.size();
int menor=INT_MAX, mayor=-1, nn=0, mm=0;
set<int>menores, mayores;
for(int i = 0 ; i < n ; i ++){
menor=min(menor, w[i]);
mayor=max(mayor, w[i]);
}
for(int i = 0 ; i < n ; i ++){
if(w[i]==menor)nn++;
else mm++;
if(w[i]==menor)menores.insert(i);
else mayores.insert(i);
}
//cout<<menor<<" "<<mayor;
for(int i = 0 ; i <= nn ; i ++){
for(int j = 0 ; j <= mm ; j++){
if(i*menor+j*mayor>=l&&i*menor+j*mayor<=u){
long long cont=0;
for(auto x:menores){
if(cont==i)break;
cont++;
respuesta.push_back(x);
//if(cont==nn)break;
}
cont=0;
for(auto x:mayores){
if(cont==j)break;
cont++;
respuesta.push_back(x);
}
return respuesta;
}
}
}
return respuesta;
//return std::vector<int>respuesta;
}
컴파일 시 표준 에러 (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... | ||||
