Submission #282993

# Submission time Handle Problem Language Result Execution time Memory
282993 2020-08-25T08:23:47 Z egekabas Brunhilda’s Birthday (BOI13_brunhilda) C++14
8.09524 / 100
38 ms 2944 KB
#include <bits/stdc++.h>
#define all(x) (x).begin(), (x).end()
#define ff first
#define ss second
#define pb push_back
#define mp make_pair
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<ll, ll> pll;
typedef pair<ull, ull> pull;
typedef pair<int, int> pii;
typedef pair<ld, ld> pld;
ll n, q;
ll p[100009];
int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    
    //freopen("in.txt", "r", stdin);
    //freopen("out.txt", "w", stdout);

    cin >> n >> q;
    ll tot = 1;
    for(ll i = 0; i < n; ++i){
        cin >> p[i];
        tot = tot*p[i];
        tot = min(tot, 10000005LL);
    }
    while(q--){
        ll x;
        cin >> x;
        if(x >= tot){
            cout << "oo\n";
        }
        else{
            cout << x/(p[n-1])*2 + (x%p[n-1] != 0) << '\n';
        }
    }
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 384 KB Output isn't correct
2 Incorrect 1 ms 384 KB Output isn't correct
3 Incorrect 0 ms 384 KB Output isn't correct
4 Incorrect 2 ms 384 KB Output isn't correct
5 Incorrect 1 ms 384 KB Output isn't correct
6 Incorrect 1 ms 384 KB Output isn't correct
7 Incorrect 1 ms 384 KB Output isn't correct
8 Incorrect 1 ms 384 KB Output isn't correct
9 Incorrect 1 ms 384 KB Output isn't correct
10 Incorrect 1 ms 384 KB Output isn't correct
11 Incorrect 1 ms 384 KB Output isn't correct
12 Correct 1 ms 392 KB Output is correct
13 Incorrect 1 ms 384 KB Output isn't correct
14 Incorrect 2 ms 384 KB Output isn't correct
15 Incorrect 1 ms 384 KB Output isn't correct
16 Incorrect 1 ms 384 KB Output isn't correct
17 Incorrect 2 ms 384 KB Output isn't correct
18 Incorrect 2 ms 384 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 512 KB Output isn't correct
2 Correct 10 ms 1792 KB Output is correct
3 Correct 7 ms 1408 KB Output is correct
4 Incorrect 1 ms 384 KB Output isn't correct
5 Correct 6 ms 1152 KB Output is correct
6 Incorrect 1 ms 384 KB Output isn't correct
7 Incorrect 2 ms 512 KB Output isn't correct
8 Incorrect 1 ms 384 KB Output isn't correct
9 Incorrect 8 ms 1408 KB Output isn't correct
10 Correct 7 ms 1408 KB Output is correct
11 Incorrect 4 ms 896 KB Output isn't correct
12 Incorrect 1 ms 384 KB Output isn't correct
13 Incorrect 1 ms 384 KB Output isn't correct
14 Incorrect 1 ms 384 KB Output isn't correct
15 Incorrect 5 ms 896 KB Output isn't correct
16 Correct 12 ms 1792 KB Output is correct
17 Incorrect 1 ms 384 KB Output isn't correct
18 Incorrect 10 ms 1792 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Incorrect 13 ms 1536 KB Output isn't correct
2 Incorrect 10 ms 1408 KB Output isn't correct
3 Incorrect 16 ms 1664 KB Output isn't correct
4 Incorrect 18 ms 1408 KB Output isn't correct
5 Incorrect 29 ms 2808 KB Output isn't correct
6 Incorrect 19 ms 1536 KB Output isn't correct
7 Incorrect 38 ms 2424 KB Output isn't correct
8 Incorrect 13 ms 1536 KB Output isn't correct
9 Incorrect 13 ms 1536 KB Output isn't correct
10 Incorrect 5 ms 512 KB Output isn't correct
11 Incorrect 6 ms 640 KB Output isn't correct
12 Incorrect 8 ms 640 KB Output isn't correct
13 Incorrect 21 ms 1792 KB Output isn't correct
14 Incorrect 19 ms 1692 KB Output isn't correct
15 Incorrect 7 ms 768 KB Output isn't correct
16 Incorrect 9 ms 768 KB Output isn't correct
17 Incorrect 7 ms 1152 KB Output isn't correct
18 Incorrect 13 ms 1408 KB Output isn't correct
19 Incorrect 5 ms 640 KB Output isn't correct
20 Incorrect 15 ms 1664 KB Output isn't correct
21 Incorrect 20 ms 1792 KB Output isn't correct
22 Incorrect 29 ms 2900 KB Output isn't correct
23 Incorrect 23 ms 1920 KB Output isn't correct
24 Incorrect 31 ms 1408 KB Output isn't correct
25 Incorrect 19 ms 1428 KB Output isn't correct
26 Incorrect 18 ms 1408 KB Output isn't correct
27 Incorrect 22 ms 2304 KB Output isn't correct
28 Incorrect 20 ms 1536 KB Output isn't correct
29 Incorrect 29 ms 2944 KB Output isn't correct
30 Incorrect 27 ms 2432 KB Output isn't correct
31 Incorrect 20 ms 1280 KB Output isn't correct
32 Incorrect 19 ms 1408 KB Output isn't correct
33 Incorrect 18 ms 1280 KB Output isn't correct
34 Incorrect 20 ms 2432 KB Output isn't correct
35 Incorrect 20 ms 1536 KB Output isn't correct
36 Incorrect 28 ms 2680 KB Output isn't correct
37 Incorrect 29 ms 2816 KB Output isn't correct
38 Incorrect 19 ms 1528 KB Output isn't correct
39 Incorrect 20 ms 1536 KB Output isn't correct
40 Incorrect 19 ms 1396 KB Output isn't correct
41 Correct 20 ms 2432 KB Output is correct
42 Incorrect 22 ms 1536 KB Output isn't correct