# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
299358 | 2020-09-14T19:16:02 Z | APROHACK | Detecting Molecules (IOI16_molecules) | C++14 | 91 ms | 65540 KB |
#include "molecules.h" #include <bits/stdc++.h> #define PB push_back using namespace std; vector<int> find_subset(int l, int u, vector<int> w) { vector<int>respuesta; sort(w.begin(), w.end()); long long sum=0, n=w.size(); long long menor=w[0], mayor=w[n-1], nn=0, mm=0; for(int i = 0 ; i < n ; i ++){ if(w[i]==menor)nn++; else mm++; } for(int i = 0 ; i <= nn ; i ++){ for(int j = 0 ; j <= mm ; j++){ if(i*menor+j*mayor>=l&&i*menor+j*mayor<=u){ for(int x = 0 ; x < nn ; x ++){ respuesta.push_back(x); } for(int x = n-1 ; x >(n-1)-mm ; x ++){ respuesta.push_back(x); } return respuesta; } } } return respuesta; //return std::vector<int>respuesta; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 384 KB | OK (n = 1, answer = NO) |
2 | Correct | 0 ms | 256 KB | OK (n = 1, answer = NO) |
3 | Correct | 0 ms | 256 KB | OK (n = 1, answer = YES) |
4 | Correct | 0 ms | 256 KB | OK (n = 2, answer = YES) |
5 | Incorrect | 1 ms | 384 KB | sum of weights should be in [100..100] but it is 200 |
6 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 91 ms | 65540 KB | Execution killed with signal 9 |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 384 KB | OK (n = 1, answer = NO) |
2 | Correct | 0 ms | 256 KB | OK (n = 1, answer = NO) |
3 | Correct | 0 ms | 256 KB | OK (n = 1, answer = YES) |
4 | Correct | 0 ms | 256 KB | OK (n = 2, answer = YES) |
5 | Incorrect | 1 ms | 384 KB | sum of weights should be in [100..100] but it is 200 |
6 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 384 KB | OK (n = 1, answer = NO) |
2 | Correct | 0 ms | 256 KB | OK (n = 1, answer = NO) |
3 | Correct | 0 ms | 256 KB | OK (n = 1, answer = YES) |
4 | Correct | 0 ms | 256 KB | OK (n = 2, answer = YES) |
5 | Incorrect | 1 ms | 384 KB | sum of weights should be in [100..100] but it is 200 |
6 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 384 KB | OK (n = 1, answer = NO) |
2 | Correct | 0 ms | 256 KB | OK (n = 1, answer = NO) |
3 | Correct | 0 ms | 256 KB | OK (n = 1, answer = YES) |
4 | Correct | 0 ms | 256 KB | OK (n = 2, answer = YES) |
5 | Incorrect | 1 ms | 384 KB | sum of weights should be in [100..100] but it is 200 |
6 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 384 KB | OK (n = 1, answer = NO) |
2 | Correct | 0 ms | 256 KB | OK (n = 1, answer = NO) |
3 | Correct | 0 ms | 256 KB | OK (n = 1, answer = YES) |
4 | Correct | 0 ms | 256 KB | OK (n = 2, answer = YES) |
5 | Incorrect | 1 ms | 384 KB | sum of weights should be in [100..100] but it is 200 |
6 | Halted | 0 ms | 0 KB | - |