# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
134059 | 2019-07-22T03:24:44 Z | junodeveloper | Detecting Molecules (IOI16_molecules) | C++14 | 3 ms | 380 KB |
#include "molecules.h" #include<bits/stdc++.h> using namespace std; std::vector<int> find_subset(int l, int u, std::vector<int> w) { int i; set<pair<long long,int> > st; long long sum=0; st.insert({0,0}); for(i=0;i<w.size();i++) { sum+=w[i]; auto it=st.lower_bound({sum-u,0}); if(it!=st.end()) { if(it->first<=sum-l) { vector<int> ans; for(int j=it->second+1;j<=i;j++) ans.push_back(j); return ans; } } st.insert({sum,i}); } return vector<int>(0); }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 376 KB | OK (n = 1, answer = NO) |
2 | Correct | 2 ms | 376 KB | OK (n = 1, answer = NO) |
3 | Incorrect | 2 ms | 380 KB | Contestant can not find answer, jury can |
4 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 348 KB | OK (n = 12, answer = YES) |
2 | Correct | 2 ms | 376 KB | OK (n = 12, answer = YES) |
3 | Correct | 2 ms | 256 KB | OK (n = 12, answer = NO) |
4 | Correct | 3 ms | 376 KB | OK (n = 12, answer = NO) |
5 | Incorrect | 2 ms | 256 KB | sum of weights should be in [290..300] but it is 250 |
6 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 376 KB | OK (n = 1, answer = NO) |
2 | Correct | 2 ms | 376 KB | OK (n = 1, answer = NO) |
3 | Incorrect | 2 ms | 380 KB | Contestant can not find answer, jury can |
4 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 376 KB | OK (n = 1, answer = NO) |
2 | Correct | 2 ms | 376 KB | OK (n = 1, answer = NO) |
3 | Incorrect | 2 ms | 380 KB | Contestant can not find answer, jury can |
4 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 376 KB | OK (n = 1, answer = NO) |
2 | Correct | 2 ms | 376 KB | OK (n = 1, answer = NO) |
3 | Incorrect | 2 ms | 380 KB | Contestant can not find answer, jury can |
4 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 376 KB | OK (n = 1, answer = NO) |
2 | Correct | 2 ms | 376 KB | OK (n = 1, answer = NO) |
3 | Incorrect | 2 ms | 380 KB | Contestant can not find answer, jury can |
4 | Halted | 0 ms | 0 KB | - |