# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
210203 | 2020-03-16T20:01:45 Z | sealnot123 | Detecting Molecules (IOI16_molecules) | C++14 | 5 ms | 376 KB |
#include "molecules.h" //#include "grader.cpp" #include<bits/stdc++.h> #define pb push_back #define eb emplace_back #define all(a) (a).begin(),(a).end() #define SZ(a) (int)(a).size() using namespace std; typedef pair<int,int> PII; typedef long long LL; typedef double DD; typedef long double LD; typedef pair<LL,LL> PLL; typedef pair<DD,DD> PDD; typedef vector<int> VI; typedef vector<LL> VL; const int N=200007; VI ans; int n; VI find_subset(int l, int r, VI w) { sort(all(w)); int i,j,k,a,b,c,d; LL sum = 0; for(int e: w) sum += e; if(sum < l) return ans; if(w[0] > r) return ans; n = SZ(w); LL last = 0; for(i=n-1;i>=0;i--){ if(l-sum+w[i] >= last){ ans.pb(i); last += w[i]; } sum -= w[i]; } return ans; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 256 KB | OK (n = 1, answer = NO) |
2 | Correct | 5 ms | 256 KB | OK (n = 1, answer = NO) |
3 | Correct | 5 ms | 376 KB | OK (n = 1, answer = YES) |
4 | Correct | 5 ms | 256 KB | OK (n = 2, answer = YES) |
5 | Incorrect | 5 ms | 256 KB | sum of weights should be in [100..100] but it is 200 |
6 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 4 ms | 256 KB | sum of weights should be in [302..304] but it is 351 |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 256 KB | OK (n = 1, answer = NO) |
2 | Correct | 5 ms | 256 KB | OK (n = 1, answer = NO) |
3 | Correct | 5 ms | 376 KB | OK (n = 1, answer = YES) |
4 | Correct | 5 ms | 256 KB | OK (n = 2, answer = YES) |
5 | Incorrect | 5 ms | 256 KB | sum of weights should be in [100..100] but it is 200 |
6 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 256 KB | OK (n = 1, answer = NO) |
2 | Correct | 5 ms | 256 KB | OK (n = 1, answer = NO) |
3 | Correct | 5 ms | 376 KB | OK (n = 1, answer = YES) |
4 | Correct | 5 ms | 256 KB | OK (n = 2, answer = YES) |
5 | Incorrect | 5 ms | 256 KB | sum of weights should be in [100..100] but it is 200 |
6 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 256 KB | OK (n = 1, answer = NO) |
2 | Correct | 5 ms | 256 KB | OK (n = 1, answer = NO) |
3 | Correct | 5 ms | 376 KB | OK (n = 1, answer = YES) |
4 | Correct | 5 ms | 256 KB | OK (n = 2, answer = YES) |
5 | Incorrect | 5 ms | 256 KB | sum of weights should be in [100..100] but it is 200 |
6 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 256 KB | OK (n = 1, answer = NO) |
2 | Correct | 5 ms | 256 KB | OK (n = 1, answer = NO) |
3 | Correct | 5 ms | 376 KB | OK (n = 1, answer = YES) |
4 | Correct | 5 ms | 256 KB | OK (n = 2, answer = YES) |
5 | Incorrect | 5 ms | 256 KB | sum of weights should be in [100..100] but it is 200 |
6 | Halted | 0 ms | 0 KB | - |