# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
161520 | 2019-11-02T20:22:59 Z | kostia244 | Detecting Molecules (IOI16_molecules) | C++14 | 2 ms | 380 KB |
#include "molecules.h" #include<bits/stdc++.h> #define all(x) x.begin(), x.end() #define rall(x) x.rbegin(), x.rend() #define pb push_back using namespace std; using ll = long long; using vi = vector<int>; vi find_subset(int l, int u, std::vector<int> w) { bitset<10010> x, y; vi par(10010, -1); x.set(0); for(int i = 0; i < w.size(); i++) { y = x; y|=y<<w[i]; x^=y; int p = x._Find_first(); while(p<=10000) { par[p]=i; p = x._Find_next(p); } } int sm = y._Find_next(l-1); if(sm>u) return {}; vi ans; while(sm) { ans.pb(par[sm]); sm -= w[ans.back()]; } return ans; }
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 | Correct | 2 ms | 376 KB | OK (n = 1, answer = YES) |
4 | Correct | 2 ms | 376 KB | OK (n = 2, answer = YES) |
5 | Correct | 2 ms | 248 KB | OK (n = 2, answer = YES) |
6 | Incorrect | 2 ms | 380 KB | Contestant can not find answer, jury can |
7 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 376 KB | Contestant can not find answer, jury can |
2 | 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 | Correct | 2 ms | 376 KB | OK (n = 1, answer = YES) |
4 | Correct | 2 ms | 376 KB | OK (n = 2, answer = YES) |
5 | Correct | 2 ms | 248 KB | OK (n = 2, answer = YES) |
6 | Incorrect | 2 ms | 380 KB | Contestant can not find answer, jury can |
7 | 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 | Correct | 2 ms | 376 KB | OK (n = 1, answer = YES) |
4 | Correct | 2 ms | 376 KB | OK (n = 2, answer = YES) |
5 | Correct | 2 ms | 248 KB | OK (n = 2, answer = YES) |
6 | Incorrect | 2 ms | 380 KB | Contestant can not find answer, jury can |
7 | 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 | Correct | 2 ms | 376 KB | OK (n = 1, answer = YES) |
4 | Correct | 2 ms | 376 KB | OK (n = 2, answer = YES) |
5 | Correct | 2 ms | 248 KB | OK (n = 2, answer = YES) |
6 | Incorrect | 2 ms | 380 KB | Contestant can not find answer, jury can |
7 | 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 | Correct | 2 ms | 376 KB | OK (n = 1, answer = YES) |
4 | Correct | 2 ms | 376 KB | OK (n = 2, answer = YES) |
5 | Correct | 2 ms | 248 KB | OK (n = 2, answer = YES) |
6 | Incorrect | 2 ms | 380 KB | Contestant can not find answer, jury can |
7 | Halted | 0 ms | 0 KB | - |