Submission #239187

# Submission time Handle Problem Language Result Execution time Memory
239187 2020-06-14T17:46:35 Z lakshith_ Detecting Molecules (IOI16_molecules) C++14
0 / 100
5 ms 384 KB
#include <bits/stdc++.h>
#define pb push_back

using namespace std;


vector <int> find_subset (int l, int u, vector <int> w){
  vector<int> result;
  int n = w.size();
  int m=0,sum=0;
  for(int i=0;i<n;i++)
    if(sum>=l&&sum<=u)break;
    else sum+=w[i];
  if(sum>=l&&sum<=u){
    m = sum/w[0];
    for(int i=0;i<m;i++)result.pb(w[0]);
    cout << m << "\n";
    return result;
  }else return result;
}

// int main(){
//     vector<int> w = {10,10,10,10};
//     int result[4];
//     int l,u;
//     
//     while(true){
//       cin >> l >> u;
//       find_subset(l,u,w);
//     }
// }
# Verdict Execution time Memory Grader output
1 Correct 5 ms 256 KB OK (n = 1, answer = NO)
2 Correct 4 ms 256 KB OK (n = 1, answer = NO)
3 Incorrect 5 ms 256 KB Secret is incorrect!
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 384 KB Contestant can not find answer, jury can
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 5 ms 256 KB OK (n = 1, answer = NO)
2 Correct 4 ms 256 KB OK (n = 1, answer = NO)
3 Incorrect 5 ms 256 KB Secret is incorrect!
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 5 ms 256 KB OK (n = 1, answer = NO)
2 Correct 4 ms 256 KB OK (n = 1, answer = NO)
3 Incorrect 5 ms 256 KB Secret is incorrect!
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 5 ms 256 KB OK (n = 1, answer = NO)
2 Correct 4 ms 256 KB OK (n = 1, answer = NO)
3 Incorrect 5 ms 256 KB Secret is incorrect!
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 5 ms 256 KB OK (n = 1, answer = NO)
2 Correct 4 ms 256 KB OK (n = 1, answer = NO)
3 Incorrect 5 ms 256 KB Secret is incorrect!
4 Halted 0 ms 0 KB -