# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1136942 | the_coding_pooh | Detecting Molecules (IOI16_molecules) | C++20 | 51 ms | 4132 KiB |
#include "molecules.h"
#include <bits/stdc++.h>
#define uwu return
using namespace std;
#define fs first
#define sc second
vector<int> find_subset(int L, int U, vector<int> w) {
vector <pair<int, int>> w_;
int N = w.size();
for(int i = 0; i < N; i++){
w_.push_back({w[i], i});
}
sort(w_.begin(), w_.end());
long long ttl = 0;
for(int l = 0, r = -1; l < N; l++){
while(ttl < L && r < N - 1){
ttl += w_[++r].fs;
}
if(L <= ttl && ttl <= U){
vector <int> ret;
for(int i = l; i <= r; i++){
ret.push_back(w_[i].sc);
}
uwu ret;
}
ttl -= w_[l].fs;
}
uwu {};
}
컴파일 시 표준 에러 (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... |