답안 #134857

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
134857 2019-07-23T10:25:15 Z reda Detecting Molecules (IOI16_molecules) C++14
9 / 100
2 ms 376 KB
#include<bits/stdc++.h>
using namespace std ;
#define pb push_back
#define mp make_pair
#define fi first
#define se second
vector<int>find_subset(int l, int u, vector<int> w)
{
      vector<pair<int,int>>v;
vector<int> ans;
      int n = w.size();
      for(int i=0;i<n;i++)
        v.pb(mp(w[i],i));
    if(v[0].fi>u)return ans;
    for(int i=0;i<n;i++)
    {
         int sum=v[i].fi;
         vector<int> hh;
         hh.pb(v[i].se);
        for(int j=0;j<n;j++)
         {
             if(i==j)continue;
             if(sum+v[j].fi>u)break;
             sum+=v[j].fi;
             hh.pb(v[j].se);
         }
         if(sum>=l)return hh;
    }
    return ans;
 }
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 252 KB OK (n = 1, answer = NO)
2 Correct 2 ms 256 KB OK (n = 1, answer = NO)
3 Correct 2 ms 256 KB OK (n = 1, answer = YES)
4 Correct 2 ms 376 KB OK (n = 2, answer = YES)
5 Correct 2 ms 376 KB OK (n = 2, answer = YES)
6 Correct 2 ms 252 KB OK (n = 3, answer = YES)
7 Correct 2 ms 256 KB OK (n = 3, answer = YES)
8 Correct 2 ms 256 KB OK (n = 3, answer = YES)
9 Correct 2 ms 256 KB OK (n = 3, answer = YES)
10 Correct 2 ms 256 KB OK (n = 3, answer = YES)
11 Correct 2 ms 256 KB OK (n = 3, answer = YES)
12 Correct 2 ms 376 KB OK (n = 3, answer = YES)
13 Correct 2 ms 376 KB OK (n = 3, answer = NO)
14 Correct 2 ms 256 KB OK (n = 3, answer = YES)
15 Correct 2 ms 256 KB OK (n = 3, answer = YES)
16 Correct 2 ms 292 KB OK (n = 3, answer = NO)
17 Correct 2 ms 256 KB OK (n = 3, answer = NO)
18 Correct 2 ms 348 KB OK (n = 100, answer = NO)
19 Correct 2 ms 296 KB OK (n = 100, answer = YES)
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 376 KB Contestant can not find answer, jury can
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 252 KB OK (n = 1, answer = NO)
2 Correct 2 ms 256 KB OK (n = 1, answer = NO)
3 Correct 2 ms 256 KB OK (n = 1, answer = YES)
4 Correct 2 ms 376 KB OK (n = 2, answer = YES)
5 Correct 2 ms 376 KB OK (n = 2, answer = YES)
6 Correct 2 ms 252 KB OK (n = 3, answer = YES)
7 Correct 2 ms 256 KB OK (n = 3, answer = YES)
8 Correct 2 ms 256 KB OK (n = 3, answer = YES)
9 Correct 2 ms 256 KB OK (n = 3, answer = YES)
10 Correct 2 ms 256 KB OK (n = 3, answer = YES)
11 Correct 2 ms 256 KB OK (n = 3, answer = YES)
12 Correct 2 ms 376 KB OK (n = 3, answer = YES)
13 Correct 2 ms 376 KB OK (n = 3, answer = NO)
14 Correct 2 ms 256 KB OK (n = 3, answer = YES)
15 Correct 2 ms 256 KB OK (n = 3, answer = YES)
16 Correct 2 ms 292 KB OK (n = 3, answer = NO)
17 Correct 2 ms 256 KB OK (n = 3, answer = NO)
18 Correct 2 ms 348 KB OK (n = 100, answer = NO)
19 Correct 2 ms 296 KB OK (n = 100, answer = YES)
20 Incorrect 2 ms 376 KB Contestant can not find answer, jury can
21 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 252 KB OK (n = 1, answer = NO)
2 Correct 2 ms 256 KB OK (n = 1, answer = NO)
3 Correct 2 ms 256 KB OK (n = 1, answer = YES)
4 Correct 2 ms 376 KB OK (n = 2, answer = YES)
5 Correct 2 ms 376 KB OK (n = 2, answer = YES)
6 Correct 2 ms 252 KB OK (n = 3, answer = YES)
7 Correct 2 ms 256 KB OK (n = 3, answer = YES)
8 Correct 2 ms 256 KB OK (n = 3, answer = YES)
9 Correct 2 ms 256 KB OK (n = 3, answer = YES)
10 Correct 2 ms 256 KB OK (n = 3, answer = YES)
11 Correct 2 ms 256 KB OK (n = 3, answer = YES)
12 Correct 2 ms 376 KB OK (n = 3, answer = YES)
13 Correct 2 ms 376 KB OK (n = 3, answer = NO)
14 Correct 2 ms 256 KB OK (n = 3, answer = YES)
15 Correct 2 ms 256 KB OK (n = 3, answer = YES)
16 Correct 2 ms 292 KB OK (n = 3, answer = NO)
17 Correct 2 ms 256 KB OK (n = 3, answer = NO)
18 Correct 2 ms 348 KB OK (n = 100, answer = NO)
19 Correct 2 ms 296 KB OK (n = 100, answer = YES)
20 Incorrect 2 ms 376 KB Contestant can not find answer, jury can
21 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 252 KB OK (n = 1, answer = NO)
2 Correct 2 ms 256 KB OK (n = 1, answer = NO)
3 Correct 2 ms 256 KB OK (n = 1, answer = YES)
4 Correct 2 ms 376 KB OK (n = 2, answer = YES)
5 Correct 2 ms 376 KB OK (n = 2, answer = YES)
6 Correct 2 ms 252 KB OK (n = 3, answer = YES)
7 Correct 2 ms 256 KB OK (n = 3, answer = YES)
8 Correct 2 ms 256 KB OK (n = 3, answer = YES)
9 Correct 2 ms 256 KB OK (n = 3, answer = YES)
10 Correct 2 ms 256 KB OK (n = 3, answer = YES)
11 Correct 2 ms 256 KB OK (n = 3, answer = YES)
12 Correct 2 ms 376 KB OK (n = 3, answer = YES)
13 Correct 2 ms 376 KB OK (n = 3, answer = NO)
14 Correct 2 ms 256 KB OK (n = 3, answer = YES)
15 Correct 2 ms 256 KB OK (n = 3, answer = YES)
16 Correct 2 ms 292 KB OK (n = 3, answer = NO)
17 Correct 2 ms 256 KB OK (n = 3, answer = NO)
18 Correct 2 ms 348 KB OK (n = 100, answer = NO)
19 Correct 2 ms 296 KB OK (n = 100, answer = YES)
20 Incorrect 2 ms 376 KB Contestant can not find answer, jury can
21 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 252 KB OK (n = 1, answer = NO)
2 Correct 2 ms 256 KB OK (n = 1, answer = NO)
3 Correct 2 ms 256 KB OK (n = 1, answer = YES)
4 Correct 2 ms 376 KB OK (n = 2, answer = YES)
5 Correct 2 ms 376 KB OK (n = 2, answer = YES)
6 Correct 2 ms 252 KB OK (n = 3, answer = YES)
7 Correct 2 ms 256 KB OK (n = 3, answer = YES)
8 Correct 2 ms 256 KB OK (n = 3, answer = YES)
9 Correct 2 ms 256 KB OK (n = 3, answer = YES)
10 Correct 2 ms 256 KB OK (n = 3, answer = YES)
11 Correct 2 ms 256 KB OK (n = 3, answer = YES)
12 Correct 2 ms 376 KB OK (n = 3, answer = YES)
13 Correct 2 ms 376 KB OK (n = 3, answer = NO)
14 Correct 2 ms 256 KB OK (n = 3, answer = YES)
15 Correct 2 ms 256 KB OK (n = 3, answer = YES)
16 Correct 2 ms 292 KB OK (n = 3, answer = NO)
17 Correct 2 ms 256 KB OK (n = 3, answer = NO)
18 Correct 2 ms 348 KB OK (n = 100, answer = NO)
19 Correct 2 ms 296 KB OK (n = 100, answer = YES)
20 Incorrect 2 ms 376 KB Contestant can not find answer, jury can
21 Halted 0 ms 0 KB -