답안 #426914

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
426914 2021-06-14T10:49:28 Z Blistering_Barnacles 커다란 상품 (IOI17_prize) C++11
90 / 100
144 ms 13376 KB
#include "prize.h"
//apig's property
//Happiness can be found, even in the darkest of times, if one only remembers to turn on the light
//El Pueblo Unido Jamas Sera Vencido
//The saddest thing about betrayal? is that it never comes from your enemies
//Do or do not... there is no try
//Billions of bilious blue blistering barnacles in a thundering typhoon!
#include<bits/stdc++.h>
#define fast ios_base::sync_with_stdio(0) , cin.tie(0) , cout.tie(0)
#define F first
#define S second
#define pb push_back
#define vll vector< ll >
#define vi vector< int >
#define pll pair< ll , ll >
#define pi pair< int , int >
#define all(s) s.begin() , s.end()
#define sz(s) s.size()
#define str string
#define md ((s + e) / 2)
#define mid ((l + r) / 2)
#define msdp(dp) memset(dp , -1 , sizeof dp)
#define mscl(dp) memset(dp , 0 , sizeof dp)
#define C continue
#define R return
#define B break
#define lx node * 2
#define rx node * 2 + 1
#define br(o) o ; break
#define co(o) o ; continue
using namespace std;
typedef int ll;
ll i , q, dp[105][100005], a[555555] , b[555555], k, l, m, n, o, p;
map < ll , ll > mp;
vll adj[555555];
const ll mod = 1e9+7;
str s;
ll omg(vll v){
    if(!v[0] && !v[1])R 1 ;
    R 0 ;
}
int find_best(int n) {
    for(i = 0 ; i < n ; ){
        vll v = ask(i) ;
        if(omg(v))R i ;
        ll l = i , r = min(n - 1 , i + 900);
        while(r - l > 1){
            vll op = ask(mid) ;
            if(omg(op))R mid ;
            if(op == v)l = mid ;
            else r = mid ;
        }
        i = l + 1 ;
    }
    R i ;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 13 ms 13256 KB Output is correct
2 Correct 15 ms 13340 KB Output is correct
3 Correct 26 ms 13256 KB Output is correct
4 Correct 38 ms 13316 KB Output is correct
5 Correct 17 ms 13256 KB Output is correct
6 Correct 9 ms 13376 KB Output is correct
7 Correct 24 ms 13256 KB Output is correct
8 Correct 14 ms 13344 KB Output is correct
9 Correct 25 ms 13336 KB Output is correct
10 Correct 30 ms 13256 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 14 ms 13340 KB Output is correct
2 Correct 22 ms 13256 KB Output is correct
3 Correct 26 ms 13256 KB Output is correct
4 Correct 20 ms 13336 KB Output is correct
5 Correct 14 ms 13336 KB Output is correct
6 Correct 9 ms 13336 KB Output is correct
7 Correct 14 ms 13332 KB Output is correct
8 Correct 14 ms 13376 KB Output is correct
9 Correct 20 ms 13256 KB Output is correct
10 Correct 40 ms 13304 KB Output is correct
11 Correct 14 ms 13332 KB Output is correct
12 Correct 9 ms 13256 KB Output is correct
13 Correct 36 ms 13256 KB Output is correct
14 Correct 17 ms 13256 KB Output is correct
15 Correct 27 ms 13256 KB Output is correct
16 Partially correct 110 ms 13256 KB Partially correct - number of queries: 8049
17 Correct 9 ms 13256 KB Output is correct
18 Partially correct 135 ms 13340 KB Partially correct - number of queries: 9742
19 Correct 9 ms 13256 KB Output is correct
20 Correct 42 ms 13256 KB Output is correct
21 Correct 61 ms 13256 KB Output is correct
22 Correct 19 ms 13256 KB Output is correct
23 Correct 13 ms 13336 KB Output is correct
24 Correct 9 ms 13256 KB Output is correct
25 Partially correct 36 ms 13376 KB Partially correct - number of queries: 5529
26 Partially correct 89 ms 13256 KB Partially correct - number of queries: 5430
27 Correct 18 ms 13332 KB Output is correct
28 Partially correct 114 ms 13208 KB Partially correct - number of queries: 9799
29 Partially correct 114 ms 13256 KB Partially correct - number of queries: 7464
30 Partially correct 89 ms 13256 KB Partially correct - number of queries: 9816
31 Correct 8 ms 13376 KB Output is correct
32 Correct 37 ms 13256 KB Output is correct
33 Correct 9 ms 13256 KB Output is correct
34 Correct 43 ms 13256 KB Output is correct
35 Correct 31 ms 13256 KB Output is correct
36 Correct 35 ms 13256 KB Output is correct
37 Correct 17 ms 13256 KB Output is correct
38 Correct 12 ms 13256 KB Output is correct
39 Correct 68 ms 13256 KB Output is correct
40 Partially correct 121 ms 13256 KB Partially correct - number of queries: 8377
41 Partially correct 60 ms 13256 KB Partially correct - number of queries: 5370
42 Partially correct 50 ms 13336 KB Partially correct - number of queries: 5370
43 Correct 76 ms 13260 KB Output is correct
44 Correct 63 ms 13256 KB Output is correct
45 Correct 51 ms 13256 KB Output is correct
46 Correct 8 ms 13256 KB Output is correct
47 Correct 75 ms 13340 KB Output is correct
48 Partially correct 73 ms 13340 KB Partially correct - number of queries: 6920
49 Correct 19 ms 13344 KB Output is correct
50 Partially correct 90 ms 13256 KB Partially correct - number of queries: 9708
51 Correct 46 ms 13256 KB Output is correct
52 Correct 10 ms 13256 KB Output is correct
53 Correct 58 ms 13344 KB Output is correct
54 Correct 65 ms 13256 KB Output is correct
55 Correct 8 ms 13256 KB Output is correct
56 Partially correct 83 ms 13256 KB Partially correct - number of queries: 9738
57 Partially correct 67 ms 13336 KB Partially correct - number of queries: 6894
58 Partially correct 102 ms 13256 KB Partially correct - number of queries: 7008
59 Partially correct 61 ms 13256 KB Partially correct - number of queries: 5370
60 Partially correct 76 ms 13256 KB Partially correct - number of queries: 5219
61 Correct 28 ms 13256 KB Output is correct
62 Correct 10 ms 13316 KB Output is correct
63 Correct 41 ms 13256 KB Output is correct
64 Correct 28 ms 13256 KB Output is correct
65 Correct 27 ms 13304 KB Output is correct
66 Correct 41 ms 13256 KB Output is correct
67 Correct 40 ms 13340 KB Output is correct
68 Correct 9 ms 13256 KB Output is correct
69 Correct 37 ms 13256 KB Output is correct
70 Correct 43 ms 13304 KB Output is correct
71 Partially correct 140 ms 13256 KB Partially correct - number of queries: 9901
72 Correct 46 ms 13256 KB Output is correct
73 Partially correct 99 ms 13256 KB Partially correct - number of queries: 9754
74 Partially correct 79 ms 13256 KB Partially correct - number of queries: 9817
75 Correct 31 ms 13256 KB Output is correct
76 Partially correct 132 ms 13256 KB Partially correct - number of queries: 8654
77 Partially correct 137 ms 13256 KB Partially correct - number of queries: 9819
78 Correct 39 ms 13256 KB Output is correct
79 Partially correct 80 ms 13256 KB Partially correct - number of queries: 5697
80 Partially correct 66 ms 13256 KB Partially correct - number of queries: 9833
81 Partially correct 144 ms 13256 KB Partially correct - number of queries: 9859
82 Partially correct 102 ms 13256 KB Partially correct - number of queries: 9756
83 Correct 31 ms 13256 KB Output is correct
84 Partially correct 106 ms 13256 KB Partially correct - number of queries: 8405
85 Partially correct 116 ms 13256 KB Partially correct - number of queries: 9880
86 Correct 31 ms 13256 KB Output is correct
87 Correct 30 ms 13256 KB Output is correct
88 Correct 45 ms 13256 KB Output is correct
89 Correct 30 ms 13256 KB Output is correct
90 Correct 28 ms 13256 KB Output is correct
91 Correct 44 ms 13256 KB Output is correct
92 Correct 45 ms 13256 KB Output is correct
93 Correct 47 ms 13256 KB Output is correct
94 Correct 34 ms 13256 KB Output is correct
95 Correct 24 ms 13288 KB Output is correct
96 Correct 45 ms 13256 KB Output is correct
97 Correct 32 ms 13256 KB Output is correct