Submission #239331

# Submission time Handle Problem Language Result Execution time Memory
239331 2020-06-15T12:00:16 Z lakshith_ Detecting Molecules (IOI16_molecules) C++14
0 / 100
5 ms 384 KB
#include <bits/stdc++.h>
#define pb push_back
#define ll long long
#define f first
#define s second

using namespace std;

vector <int> find_subset (int l, int u, vector <int> w){
  int n = w.size();
  vector<int> r;
  vector<pair<ll,ll>> vec;
  for(int i=0;i<n;i++)vec.pb({w[i],i});
  sort(vec.begin(),vec.end());
  ll sum = 0;
  for(int i=0,j=0;j<n;j++){
    sum += vec[j].f;
    while(sum>u){
      sum -= vec[i++].f;
    }
    if(sum>l){
      for(int k=i;k<=j;k++){
        r.pb(vec[k].s);
      }
      break;
    }
  }
  return r;
}
# Verdict Execution time Memory Grader output
1 Correct 5 ms 384 KB OK (n = 1, answer = NO)
2 Correct 4 ms 256 KB OK (n = 1, answer = NO)
3 Incorrect 5 ms 256 KB Contestant can not find answer, jury can
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 4 ms 256 KB OK (n = 12, answer = YES)
2 Correct 4 ms 256 KB OK (n = 12, answer = YES)
3 Correct 5 ms 256 KB OK (n = 12, answer = NO)
4 Correct 5 ms 256 KB OK (n = 12, answer = NO)
5 Correct 5 ms 256 KB OK (n = 12, answer = YES)
6 Incorrect 5 ms 384 KB Contestant can not find answer, jury can
7 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 5 ms 384 KB OK (n = 1, answer = NO)
2 Correct 4 ms 256 KB OK (n = 1, answer = NO)
3 Incorrect 5 ms 256 KB Contestant can not find answer, jury can
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 5 ms 384 KB OK (n = 1, answer = NO)
2 Correct 4 ms 256 KB OK (n = 1, answer = NO)
3 Incorrect 5 ms 256 KB Contestant can not find answer, jury can
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 5 ms 384 KB OK (n = 1, answer = NO)
2 Correct 4 ms 256 KB OK (n = 1, answer = NO)
3 Incorrect 5 ms 256 KB Contestant can not find answer, jury can
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 5 ms 384 KB OK (n = 1, answer = NO)
2 Correct 4 ms 256 KB OK (n = 1, answer = NO)
3 Incorrect 5 ms 256 KB Contestant can not find answer, jury can
4 Halted 0 ms 0 KB -