Submission #864061

# Submission time Handle Problem Language Result Execution time Memory
864061 2023-10-21T19:23:32 Z Danilo21 Ancient Machine 2 (JOI23_ancient2) C++17
10 / 100
84 ms 1720 KB
#include <bits/stdc++.h>
#include "ancient2.h"

#define ll long long
#define ld long double
#define pb push_back
#define fi first
#define se second
#define en '\n'
#define sp ' '
#define tb '\t'
#define ri(n) int n; cin >> n
#define rl(n) ll n; cin >> n
#define rs(s) string s; cin >> s
#define rc(c) char c; cin >> c
#define rv(v) for (auto &x : v) cin >> x
#define pven(v) for (auto x : v) cout << x << en
#define pv(v) for (auto x : v) cout << x << sp; cout << en
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
#define yes cout << "YES" << en
#define no cout << "NO" << en
#define smin(a, b) a = min(a, b)
#define smax(a, b) a = max(a, b)
#define ssort(a, b) if (a < b) swap(a, b)
#define bitcnt(a) (__builtin_popcountll(a))
#define bithigh(a) (63-__builtin_clzll(a))
#define lg bithigh
#define highpow(a) (1LL << (ll)lg(a))

using namespace std;

const ll LINF = 2e18;
const int mxN = 2e3+10, INF = 2e9;

string Solve(int N) {
    string s = "";
    for (int i = 0; i < N; i++){
        vector<int> a, b;
        for (int j = 0; j < i; j++){
            a.pb(j+1);
            b.pb(j+1);
        }
        a.pb(i+1); b.pb(i+2);
        a.pb(i+1); b.pb(i+1);
        a.pb(i+2); b.pb(i+2);
        if (Query(i+3, a, b) == i+1)
            s += '0';
        else s += '1';
    }
    return s;
}
# Verdict Execution time Memory Grader output
1 Partially correct 72 ms 1016 KB Output is partially correct
2 Partially correct 71 ms 1268 KB Output is partially correct
3 Partially correct 73 ms 1264 KB Output is partially correct
4 Partially correct 69 ms 1512 KB Output is partially correct
5 Partially correct 71 ms 1016 KB Output is partially correct
6 Partially correct 76 ms 1260 KB Output is partially correct
7 Partially correct 69 ms 1096 KB Output is partially correct
8 Partially correct 71 ms 1244 KB Output is partially correct
9 Partially correct 76 ms 1292 KB Output is partially correct
10 Partially correct 72 ms 1516 KB Output is partially correct
11 Partially correct 71 ms 1208 KB Output is partially correct
12 Partially correct 71 ms 1004 KB Output is partially correct
13 Partially correct 70 ms 1176 KB Output is partially correct
14 Partially correct 77 ms 1156 KB Output is partially correct
15 Partially correct 69 ms 728 KB Output is partially correct
16 Partially correct 75 ms 1040 KB Output is partially correct
17 Partially correct 78 ms 1332 KB Output is partially correct
18 Partially correct 69 ms 1012 KB Output is partially correct
19 Partially correct 78 ms 1284 KB Output is partially correct
20 Partially correct 77 ms 952 KB Output is partially correct
21 Partially correct 72 ms 984 KB Output is partially correct
22 Partially correct 71 ms 1192 KB Output is partially correct
23 Partially correct 72 ms 940 KB Output is partially correct
24 Partially correct 69 ms 1312 KB Output is partially correct
25 Partially correct 76 ms 1000 KB Output is partially correct
26 Partially correct 71 ms 904 KB Output is partially correct
27 Partially correct 69 ms 880 KB Output is partially correct
28 Partially correct 84 ms 1364 KB Output is partially correct
29 Partially correct 73 ms 1184 KB Output is partially correct
30 Partially correct 70 ms 1624 KB Output is partially correct
31 Partially correct 74 ms 968 KB Output is partially correct
32 Partially correct 74 ms 1008 KB Output is partially correct
33 Partially correct 70 ms 1228 KB Output is partially correct
34 Partially correct 79 ms 1328 KB Output is partially correct
35 Partially correct 72 ms 1068 KB Output is partially correct
36 Partially correct 75 ms 1192 KB Output is partially correct
37 Partially correct 70 ms 1296 KB Output is partially correct
38 Partially correct 72 ms 1488 KB Output is partially correct
39 Partially correct 72 ms 1320 KB Output is partially correct
40 Partially correct 74 ms 1332 KB Output is partially correct
41 Partially correct 77 ms 1280 KB Output is partially correct
42 Partially correct 72 ms 1004 KB Output is partially correct
43 Partially correct 69 ms 956 KB Output is partially correct
44 Partially correct 76 ms 1252 KB Output is partially correct
45 Partially correct 70 ms 1028 KB Output is partially correct
46 Partially correct 69 ms 668 KB Output is partially correct
47 Partially correct 74 ms 1100 KB Output is partially correct
48 Partially correct 75 ms 1284 KB Output is partially correct
49 Partially correct 72 ms 1104 KB Output is partially correct
50 Partially correct 81 ms 1172 KB Output is partially correct
51 Partially correct 73 ms 1264 KB Output is partially correct
52 Partially correct 74 ms 1264 KB Output is partially correct
53 Partially correct 82 ms 1292 KB Output is partially correct
54 Partially correct 78 ms 1400 KB Output is partially correct
55 Partially correct 83 ms 1628 KB Output is partially correct
56 Partially correct 70 ms 1112 KB Output is partially correct
57 Partially correct 70 ms 1524 KB Output is partially correct
58 Partially correct 70 ms 1320 KB Output is partially correct
59 Partially correct 73 ms 1248 KB Output is partially correct
60 Partially correct 69 ms 1344 KB Output is partially correct
61 Partially correct 77 ms 1284 KB Output is partially correct
62 Partially correct 74 ms 1272 KB Output is partially correct
63 Partially correct 71 ms 1720 KB Output is partially correct