Submission #1084964

# Submission time Handle Problem Language Result Execution time Memory
1084964 2024-09-07T09:10:58 Z browntoad ICC (CEOI16_icc) C++14
7 / 100
199 ms 856 KB
#include <bits/stdc++.h>
#include "icc.h"
using namespace std;
#define ll long long
// #define int ll
#define FOR(i, a, b) for(int i = (a); i < (b); i++)
#define REP(i, n) FOR(i, 0, n)
#define REP1(i, n) FOR(i, 1, n+1)
#define RREP(i, n) for (int i = (n)-1; i >= 0; i--)
#define RREP1(i, n) for (int i = (n); i >= 1; i--)
#define pii pair<int, int>
#define ppi pair<pii, int>
#define pip pair<int, pii>
#define ALL(x) (x).begin(), (x).end()
#define SZ(x) (int)((x).size())
#define f first
#define s second
#define pb push_back
#define endl '\n'
#define IOS() ios::sync_with_stdio(false), cin.tie(0), cout.tie(0)

const ll maxn = 105;
const ll mod = 1e9+7;
const ll inf = 1ll<<60;

ll mpw(ll a, ll p, ll m = mod){
    ll ret = 1;
    while(p > 0){
        if (p & 1){
            ret *= a;
            ret %= m;
        }
        p >>= 1;
        a *= a;
        a %= m;
    }
    return ret;
}
ll inv(ll a){
    return mpw(a, mod-2);
}

bool ex[maxn][maxn];
void run(int n){
    vector<vector<int>> cc;
    REP1(i, n){
        cc.pb({i});
    }

    REP(i, n-1){
        bool gg = false;
        REP1(j, n){
            if (gg) break;
            FOR(k, j+1, n+1){
                int t1[1] = {j};
                int t2[1] = {k};
                int ret = query(1, 1, t1, t2);
                if (ret && !ex[j][k]){
                    setRoad(k, j);
                    ex[j][k] = 1;
                    gg = 1;
                    break;
                }
            }
        }
    }
}
# Verdict Execution time Memory Grader output
1 Correct 33 ms 856 KB Ok! 1015 queries used.
2 Correct 33 ms 600 KB Ok! 1010 queries used.
# Verdict Execution time Memory Grader output
1 Incorrect 186 ms 604 KB Number of queries more than 5000 out of 2500
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 199 ms 604 KB Number of queries more than 4500 out of 2250
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 189 ms 620 KB Number of queries more than 4000 out of 2000
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 160 ms 600 KB Number of queries more than 3550 out of 1775
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 153 ms 600 KB Number of queries more than 3250 out of 1625
2 Halted 0 ms 0 KB -