# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
287627 | Ruba_K | Detecting Molecules (IOI16_molecules) | C++14 | 1 ms | 256 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "molecules.h"
#include<bits/stdc++.h>
using namespace std ;
vector<int> find_subset(int l, int u, vector<int> w) {
int n = w.size();
map<int , int > mp;
for(auto f : w)
mp[f]++;
int first , second ;
int n1 , n2 ;
first = mp[w[0]] , n1 = w[0];
if(mp.size() == 1)second = 0 , n2 = 0 ;
else {
for(auto f : mp){
if(f.first != n1){
n2 = f.first ;
second = f.second ;
break;
}
}
}
vector<int>ans ;
for(int i = 0 ; i <= first ; i ++){
for(int j = 0 ; j <= second ; j ++){
int sum = j * n1 + i * n2 ;
if(sum >= l && sum <= u){
map<int , int > cnt ;
for(int c = 0 ; c < n ; c ++){
if(w[c] == n1 && cnt[n1] == i)continue ;
if(w[c] == n2 && cnt[n2] == j)continue ;
cnt[w[c]]++;
ans.push_back(c );
}
}
if(ans.size())break;
}
if(ans.size())break;
}
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... |