Submission #1062374

# Submission time Handle Problem Language Result Execution time Memory
1062374 2024-08-17T05:11:34 Z Sir_Ahmed_Imran The Big Prize (IOI17_prize) C++17
20 / 100
59 ms 428 KB
                                    ///~~~LOTA~~~///
#include <bits/stdc++.h>
#include "prize.h"
using namespace std;
#define ll long long
#define ld long double
#define append push_back
#define add insert
#define nl '\n'
#define ff first
#define ss second
#define pii pair<int,int>
#define pll pair<ll,ll>
#define all(x) (x).begin(),(x).end()
#define L0TA ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define terminator main
#define MAXN 200000
int find_best(int n){
    int m,o;
    srand(time(0));
    vector<int> a;
    for(int i=m=0;i<100;i++){
        a=ask(rand()%n);
        m=max(m,a[0]+a[1]);
    }
    o=0;
    while(o<n){
        a=ask(o);
        if(!a[0] && !a[1])
            return o;
        if(a[0]+a[1]==m){
            for(int i=131072;i>0;i/=2)
                if(o+i<n && ask(o+i)==a)
                    o+=i;
        }
        o++;
    }
    return o;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 1 ms 344 KB Output is correct
3 Correct 1 ms 344 KB Output is correct
4 Correct 1 ms 344 KB Output is correct
5 Correct 1 ms 344 KB Output is correct
6 Correct 1 ms 344 KB Output is correct
7 Correct 1 ms 344 KB Output is correct
8 Correct 1 ms 344 KB Output is correct
9 Correct 1 ms 424 KB Output is correct
10 Correct 1 ms 344 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 1 ms 344 KB Output is correct
3 Correct 1 ms 344 KB Output is correct
4 Correct 1 ms 344 KB Output is correct
5 Correct 1 ms 344 KB Output is correct
6 Correct 1 ms 344 KB Output is correct
7 Correct 1 ms 344 KB Output is correct
8 Correct 1 ms 424 KB Output is correct
9 Correct 1 ms 344 KB Output is correct
10 Correct 1 ms 344 KB Output is correct
11 Correct 2 ms 344 KB Output is correct
12 Correct 1 ms 344 KB Output is correct
13 Correct 3 ms 424 KB Output is correct
14 Correct 3 ms 344 KB Output is correct
15 Correct 6 ms 344 KB Output is correct
16 Partially correct 35 ms 344 KB Partially correct - number of queries: 7621
17 Correct 1 ms 344 KB Output is correct
18 Partially correct 39 ms 344 KB Partially correct - number of queries: 8936
19 Correct 1 ms 344 KB Output is correct
20 Correct 10 ms 344 KB Output is correct
21 Correct 12 ms 344 KB Output is correct
22 Correct 4 ms 344 KB Output is correct
23 Correct 1 ms 344 KB Output is correct
24 Correct 1 ms 428 KB Output is correct
25 Partially correct 19 ms 344 KB Partially correct - number of queries: 5085
26 Partially correct 24 ms 344 KB Partially correct - number of queries: 5004
27 Correct 1 ms 344 KB Output is correct
28 Partially correct 42 ms 344 KB Partially correct - number of queries: 8486
29 Partially correct 28 ms 344 KB Partially correct - number of queries: 6451
30 Partially correct 49 ms 344 KB Partially correct - number of queries: 8860
31 Correct 1 ms 344 KB Output is correct
32 Correct 3 ms 344 KB Output is correct
33 Correct 1 ms 344 KB Output is correct
34 Correct 15 ms 344 KB Output is correct
35 Correct 2 ms 344 KB Output is correct
36 Correct 9 ms 344 KB Output is correct
37 Correct 2 ms 344 KB Output is correct
38 Correct 1 ms 340 KB Output is correct
39 Correct 18 ms 344 KB Output is correct
40 Partially correct 36 ms 344 KB Partially correct - number of queries: 7588
41 Partially correct 29 ms 344 KB Partially correct - number of queries: 5374
42 Partially correct 23 ms 344 KB Partially correct - number of queries: 5374
43 Correct 19 ms 344 KB Output is correct
44 Correct 23 ms 344 KB Output is correct
45 Correct 9 ms 344 KB Output is correct
46 Correct 1 ms 344 KB Output is correct
47 Correct 24 ms 344 KB Output is correct
48 Partially correct 25 ms 340 KB Partially correct - number of queries: 6631
49 Correct 3 ms 344 KB Output is correct
50 Partially correct 43 ms 344 KB Partially correct - number of queries: 8936
51 Correct 18 ms 344 KB Output is correct
52 Correct 1 ms 344 KB Output is correct
53 Correct 1 ms 344 KB Output is correct
54 Correct 12 ms 344 KB Output is correct
55 Correct 1 ms 344 KB Output is correct
56 Partially correct 43 ms 344 KB Partially correct - number of queries: 8936
57 Partially correct 37 ms 344 KB Partially correct - number of queries: 6538
58 Partially correct 50 ms 344 KB Partially correct - number of queries: 6650
59 Partially correct 28 ms 344 KB Partially correct - number of queries: 5374
60 Correct 16 ms 344 KB Output is correct
61 Correct 1 ms 344 KB Output is correct
62 Correct 1 ms 344 KB Output is correct
63 Correct 1 ms 344 KB Output is correct
64 Correct 1 ms 340 KB Output is correct
65 Correct 1 ms 344 KB Output is correct
66 Correct 4 ms 428 KB Output is correct
67 Correct 1 ms 344 KB Output is correct
68 Correct 3 ms 344 KB Output is correct
69 Correct 2 ms 344 KB Output is correct
70 Correct 1 ms 344 KB Output is correct
71 Partially correct 49 ms 340 KB Partially correct - number of queries: 8928
72 Correct 3 ms 344 KB Output is correct
73 Partially correct 54 ms 344 KB Partially correct - number of queries: 8798
74 Partially correct 35 ms 344 KB Partially correct - number of queries: 8852
75 Correct 1 ms 344 KB Output is correct
76 Partially correct 35 ms 344 KB Partially correct - number of queries: 7578
77 Partially correct 43 ms 344 KB Partially correct - number of queries: 8904
78 Correct 4 ms 344 KB Output is correct
79 Correct 22 ms 344 KB Output is correct
80 Partially correct 37 ms 344 KB Partially correct - number of queries: 8932
81 Partially correct 45 ms 344 KB Partially correct - number of queries: 8933
82 Partially correct 44 ms 344 KB Partially correct - number of queries: 8161
83 Correct 1 ms 344 KB Output is correct
84 Partially correct 42 ms 344 KB Partially correct - number of queries: 7260
85 Partially correct 45 ms 344 KB Partially correct - number of queries: 8907
86 Partially correct 20 ms 344 KB Partially correct - number of queries: 5798
87 Correct 4 ms 344 KB Output is correct
88 Partially correct 43 ms 344 KB Partially correct - number of queries: 8078
89 Partially correct 35 ms 344 KB Partially correct - number of queries: 5758
90 Correct 1 ms 344 KB Output is correct
91 Correct 16 ms 344 KB Output is correct
92 Partially correct 33 ms 344 KB Partially correct - number of queries: 7857
93 Incorrect 59 ms 344 KB Incorrect
94 Halted 0 ms 0 KB -