Submission #312106

# Submission time Handle Problem Language Result Execution time Memory
312106 2020-10-12T11:25:49 Z Nayna Detecting Molecules (IOI16_molecules) C++14
9 / 100
1 ms 256 KB
#include "molecules.h"
#include <bits/stdc++.h>
typedef long long ll;
using namespace std;

vector<int> find_subset(int l, int u, vector<int> w)
{
    int ok = true;
    int n = w.size();
    int cnt = -1;
    for(int i = 1; i <= n; i++)
    {
        int x = w[0]*i;
        if(x>=l && x<=u)
        {
            cnt = i;
            break;
        }
    }
    vector<int>res;
    if(cnt!=-1)
    {
        for(int i = 0; i < cnt; i++) res.push_back(i);
    }
    return res;
}

Compilation message

molecules.cpp: In function 'std::vector<int> find_subset(int, int, std::vector<int>)':
molecules.cpp:8:9: warning: unused variable 'ok' [-Wunused-variable]
    8 |     int ok = true;
      |         ^~
# Verdict Execution time Memory Grader output
1 Correct 1 ms 256 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 Correct 1 ms 256 KB OK (n = 2, answer = YES)
6 Correct 0 ms 256 KB OK (n = 3, answer = YES)
7 Correct 0 ms 256 KB OK (n = 3, answer = YES)
8 Correct 0 ms 256 KB OK (n = 3, answer = YES)
9 Correct 0 ms 256 KB OK (n = 3, answer = YES)
10 Correct 0 ms 256 KB OK (n = 3, answer = YES)
11 Correct 0 ms 256 KB OK (n = 3, answer = YES)
12 Correct 1 ms 256 KB OK (n = 3, answer = YES)
13 Correct 0 ms 256 KB OK (n = 3, answer = NO)
14 Correct 1 ms 256 KB OK (n = 3, answer = YES)
15 Correct 0 ms 256 KB OK (n = 3, answer = YES)
16 Correct 0 ms 256 KB OK (n = 3, answer = NO)
17 Correct 0 ms 256 KB OK (n = 3, answer = NO)
18 Correct 0 ms 256 KB OK (n = 100, answer = NO)
19 Correct 0 ms 256 KB OK (n = 100, answer = YES)
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 256 KB Contestant can not find answer, jury can
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 256 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 Correct 1 ms 256 KB OK (n = 2, answer = YES)
6 Correct 0 ms 256 KB OK (n = 3, answer = YES)
7 Correct 0 ms 256 KB OK (n = 3, answer = YES)
8 Correct 0 ms 256 KB OK (n = 3, answer = YES)
9 Correct 0 ms 256 KB OK (n = 3, answer = YES)
10 Correct 0 ms 256 KB OK (n = 3, answer = YES)
11 Correct 0 ms 256 KB OK (n = 3, answer = YES)
12 Correct 1 ms 256 KB OK (n = 3, answer = YES)
13 Correct 0 ms 256 KB OK (n = 3, answer = NO)
14 Correct 1 ms 256 KB OK (n = 3, answer = YES)
15 Correct 0 ms 256 KB OK (n = 3, answer = YES)
16 Correct 0 ms 256 KB OK (n = 3, answer = NO)
17 Correct 0 ms 256 KB OK (n = 3, answer = NO)
18 Correct 0 ms 256 KB OK (n = 100, answer = NO)
19 Correct 0 ms 256 KB OK (n = 100, answer = YES)
20 Incorrect 0 ms 256 KB Contestant can not find answer, jury can
21 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 256 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 Correct 1 ms 256 KB OK (n = 2, answer = YES)
6 Correct 0 ms 256 KB OK (n = 3, answer = YES)
7 Correct 0 ms 256 KB OK (n = 3, answer = YES)
8 Correct 0 ms 256 KB OK (n = 3, answer = YES)
9 Correct 0 ms 256 KB OK (n = 3, answer = YES)
10 Correct 0 ms 256 KB OK (n = 3, answer = YES)
11 Correct 0 ms 256 KB OK (n = 3, answer = YES)
12 Correct 1 ms 256 KB OK (n = 3, answer = YES)
13 Correct 0 ms 256 KB OK (n = 3, answer = NO)
14 Correct 1 ms 256 KB OK (n = 3, answer = YES)
15 Correct 0 ms 256 KB OK (n = 3, answer = YES)
16 Correct 0 ms 256 KB OK (n = 3, answer = NO)
17 Correct 0 ms 256 KB OK (n = 3, answer = NO)
18 Correct 0 ms 256 KB OK (n = 100, answer = NO)
19 Correct 0 ms 256 KB OK (n = 100, answer = YES)
20 Incorrect 0 ms 256 KB Contestant can not find answer, jury can
21 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 256 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 Correct 1 ms 256 KB OK (n = 2, answer = YES)
6 Correct 0 ms 256 KB OK (n = 3, answer = YES)
7 Correct 0 ms 256 KB OK (n = 3, answer = YES)
8 Correct 0 ms 256 KB OK (n = 3, answer = YES)
9 Correct 0 ms 256 KB OK (n = 3, answer = YES)
10 Correct 0 ms 256 KB OK (n = 3, answer = YES)
11 Correct 0 ms 256 KB OK (n = 3, answer = YES)
12 Correct 1 ms 256 KB OK (n = 3, answer = YES)
13 Correct 0 ms 256 KB OK (n = 3, answer = NO)
14 Correct 1 ms 256 KB OK (n = 3, answer = YES)
15 Correct 0 ms 256 KB OK (n = 3, answer = YES)
16 Correct 0 ms 256 KB OK (n = 3, answer = NO)
17 Correct 0 ms 256 KB OK (n = 3, answer = NO)
18 Correct 0 ms 256 KB OK (n = 100, answer = NO)
19 Correct 0 ms 256 KB OK (n = 100, answer = YES)
20 Incorrect 0 ms 256 KB Contestant can not find answer, jury can
21 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 256 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 Correct 1 ms 256 KB OK (n = 2, answer = YES)
6 Correct 0 ms 256 KB OK (n = 3, answer = YES)
7 Correct 0 ms 256 KB OK (n = 3, answer = YES)
8 Correct 0 ms 256 KB OK (n = 3, answer = YES)
9 Correct 0 ms 256 KB OK (n = 3, answer = YES)
10 Correct 0 ms 256 KB OK (n = 3, answer = YES)
11 Correct 0 ms 256 KB OK (n = 3, answer = YES)
12 Correct 1 ms 256 KB OK (n = 3, answer = YES)
13 Correct 0 ms 256 KB OK (n = 3, answer = NO)
14 Correct 1 ms 256 KB OK (n = 3, answer = YES)
15 Correct 0 ms 256 KB OK (n = 3, answer = YES)
16 Correct 0 ms 256 KB OK (n = 3, answer = NO)
17 Correct 0 ms 256 KB OK (n = 3, answer = NO)
18 Correct 0 ms 256 KB OK (n = 100, answer = NO)
19 Correct 0 ms 256 KB OK (n = 100, answer = YES)
20 Incorrect 0 ms 256 KB Contestant can not find answer, jury can
21 Halted 0 ms 0 KB -