Submission #319349

# Submission time Handle Problem Language Result Execution time Memory
319349 2020-11-05T01:41:53 Z mglstew Detecting Molecules (IOI16_molecules) C++17
0 / 100
1 ms 492 KB
#include <bits/stdc++.h>
#include "molecules.h"
using namespace std;

vector<int> find_subset(int l, int u, std::vector<int> w) {
    sort(w.begin(), w.end());
    int n = w.size();
    int L = 0;
    int R = 0;
    long long sum = 0;
    vector<int> a;
    while(R < n){
    	sum += a[R];
    	while(sum >= 1){
    		for(int i = L; i <= R; i++){
    			a.push_back(w[i]);
    			break;
    		}
    	}
    	R++;
    }
    if(a.size() == 0){
    	a.push_back(0);
    }
    return a;
}
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 492 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 492 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 492 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 492 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 492 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 492 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -