Submission #281530

# Submission time Handle Problem Language Result Execution time Memory
281530 2020-08-23T06:34:31 Z kartel Vision Program (IOI19_vision) C++14
0 / 100
12 ms 1328 KB
#include <bits/stdc++.h>
//#include "grader.cpp"
#include "vision.h"
//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>
#define in(x) freopen(x, "r", stdin)
#define out(x) freopen(x, "w", stdout)
#pragma GCC optimize("unroll-loops")
#pragma GCC optimize("-O3")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("fast-math")
#pragma GCC optimize("no-stack-protector")
#define F first
#define S second
#define pb push_back
#define N +200500
#define M ll(1e9 + 7)
#define sz(x) (int)x.size()
#define re return
#define oo ll(1e9)
#define el '\n'
#define Max_A int(1e9)
//#define el endl
#define pii pair <int, int>
#define piii pair <int, pair <int, int> >
#define psi pair <string, int>
#define err ld(1e-9)
#define Max_S int(3e6)
#define last(x) (x).back()
#define all(x) (x).begin(), (x).end()
#define allr(x) (x).rbegin(), (x).rend()
#define arr_all(x, n) (x + 1), (x + 1 + n)
#define vi vector<int>
using namespace std;
//using namespace __gnu_pbds;
//typedef tree <int, null_type, less_equal <int> , rb_tree_tag, tree_order_statistics_node_update> ordered_set;
typedef long long ll;
typedef long double ld;

void construct_network(int n, int m, int k)
{
    int l = 0;
    int r = n * m - 1;

    while (l < r)
    {
        int md = (l + r) >> 1;

        vi arr;

        for (int i = 0; i <= md; i++)
            arr.pb(i);

        if (add_or(arr))
             r = md;
        else l = md + 1;
    }

    int x = l / m;
    int y = l % m;

    cerr << x << " " << y << el;

    int L = l++;
    r = n * m - 1;
    while (l < r)
    {
        int md = (l + r) >> 1;

        vi arr;

        for (int i = L + 1; i <= md; i++)
            arr.pb(i);

        if (add_or(arr))
             r = md;
        else l = md + 1;
    }

    vi arr;
    arr.pb(L);
    arr.pb(l);

    add_and(arr);
    return;
}

//int main()
//{
//    srand(time(0));
//    cout.precision(3);
//    cout << fixed;
//    ios_base::sync_with_stdio(0);
//    iostream::sync_with_stdio(0);
//    ios::sync_with_stdio(0);
//    cin.tie(NULL);
//    cout.tie(NULL);
//
////    in("input.txt");
////    out("output.txt");
//
//
//}

/*
4 4
0110
0000
1101
1100
*/
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 384 KB on inputs (0, 1), (0, 2), expected 1, but computed 0
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 384 KB on inputs (0, 1), (0, 2), expected 1, but computed 0
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 384 KB on inputs (0, 1), (0, 2), expected 1, but computed 0
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 384 KB on inputs (0, 1), (0, 2), expected 1, but computed 0
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 384 KB on inputs (0, 1), (0, 2), expected 1, but computed 0
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 384 KB on inputs (0, 0), (1, 0), expected 1, but computed 0
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 12 ms 1328 KB on inputs (80, 199), (81, 199), expected 1, but computed 0
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 384 KB on inputs (0, 1), (0, 2), expected 1, but computed 0
2 Halted 0 ms 0 KB -