# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
106421 | 2019-04-18T11:16:55 Z | DodgeBallMan | Detecting Molecules (IOI16_molecules) | C++14 | 3 ms | 384 KB |
#include <bits/stdc++.h> #include "molecules.h" #define pii pair<int, int> #define x first #define y second using namespace std; vector<pii> v; vector<int> ans; int l, r; long long sum; vector<int> find_subset( int l, int u, vector<int> w ) { for( int i = 0 ; i < w.size() ; i++ ) v.emplace_back( pii( w[i], i ) ); sort( v.begin(), v.end() ); while( l < w.size() ) { while( r < w.size() && sum < l ) sum += ( long long ) v[r++].x; if( sum >= l && sum <= u ) { for( int i = l ; i < r ; i++ ) ans.emplace_back( v[i].y ); return ans; } sum -= ( long long ) v[l++].x; } return {}; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 3 ms | 256 KB | OK (n = 1, answer = NO) |
2 | Correct | 2 ms | 256 KB | OK (n = 1, answer = NO) |
3 | Incorrect | 3 ms | 384 KB | Contestant can not find answer, jury can |
4 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 256 KB | Contestant can not find answer, jury can |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 3 ms | 256 KB | OK (n = 1, answer = NO) |
2 | Correct | 2 ms | 256 KB | OK (n = 1, answer = NO) |
3 | Incorrect | 3 ms | 384 KB | Contestant can not find answer, jury can |
4 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 3 ms | 256 KB | OK (n = 1, answer = NO) |
2 | Correct | 2 ms | 256 KB | OK (n = 1, answer = NO) |
3 | Incorrect | 3 ms | 384 KB | Contestant can not find answer, jury can |
4 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 3 ms | 256 KB | OK (n = 1, answer = NO) |
2 | Correct | 2 ms | 256 KB | OK (n = 1, answer = NO) |
3 | Incorrect | 3 ms | 384 KB | Contestant can not find answer, jury can |
4 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 3 ms | 256 KB | OK (n = 1, answer = NO) |
2 | Correct | 2 ms | 256 KB | OK (n = 1, answer = NO) |
3 | Incorrect | 3 ms | 384 KB | Contestant can not find answer, jury can |
4 | Halted | 0 ms | 0 KB | - |