| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 942078 | Nika533 | Detecting Molecules (IOI16_molecules) | C++14 | 1 ms | 600 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#pragma GCC diagnostic warning "-std=c++11"
#include <bits/stdc++.h>
#include "molecules.h"
#define pb push_back
#define f first
#define s second
#define MOD 1000000007
#define flush fflush(stdout)
#define all(x) (x).begin(),(x).end()
#define allr(x) (x).rbegin(), (x).rend()
#define pii pair<int,int>
using namespace std;
int n,T,k;
vector<int> find_subset(int l, int u, vector<int> w) {
n=w.size();
pii arr[n+1];
for (int i=1; i<=n; i++) {
arr[i].f=w[i-1];
arr[i].s=i-1;
}
sort(arr+1,arr+1+n);
int s=0,b=0;
for (int i=1; i<=n; i++) {
if (arr[i].f==arr[1].f) s++;
else b++;
}
int m=arr[1].f;
vector<int> v;
for (int i=0; i<=s; i++) {
for (int j=0; j<=b; j++) {
int sum=i*m+j*(m+1);
if (sum>=l && sum<=u) {
for (int o=1; o<=i; o++) v.pb(arr[o].s);
for (int o=n; o>=n-j+1; o--) v.pb(arr[o].s);
sort(all(v));
return v;
}
}
}
return v;
}
컴파일 시 표준 에러 (stderr) 메시지
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
