Submission #617894

# Submission time Handle Problem Language Result Execution time Memory
617894 2022-08-01T16:31:00 Z AmirElarbi Hexagonal Territory (APIO21_hexagon) C++14
0 / 100
1 ms 340 KB
#include <bits/stdc++.h>
#define vi vector<int>
#define ve vector
#define ll long long
#define vf vector<float>
#define vll vector<pair<ll,ll>>
#define ii pair<int,int>
#define pll pair<ll,ll>
#define vvi vector<vi>
#define vii vector<ii>
#define gii greater<ii>
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define INF 2e9+5
#define eps 1e-7
#define eps1 1e-25
#define optimise ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define MAX_A 1e5+5
#define V 450
using namespace std;
const int MOD = 1e9+7;
const int nax = 2e5+5;
const int lg = 20;
#include "hexagon.h"
int mul(int a, int b){
    return (a*1ll*b)%MOD;
}
int binpow(int x, int y){
    int z = 1;
    while(y > 0){
        if(y%2 == 1) z = mul(x, z);
        x = mul(x,x);
        y /= 2;
    } 
    return z;
}
int inv(int a){
    return binpow(a, MOD-2);
}
int divide(int a, int b){
    return mul(a,inv(b));
}
int draw_territory(int n, int a, int b, vi d, vi l){
    assert(l[0]==l[1]);
    assert(l[0]==l[2]);
    return mul(a,divide(mul(l[0], l[0]+1), 2));
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 340 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 340 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 340 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 340 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -