Submission #566587

# Submission time Handle Problem Language Result Execution time Memory
566587 2022-05-22T12:41:10 Z josanneo22 Hexagonal Territory (APIO21_hexagon) C++17
0 / 100
2000 ms 212 KB
#include "hexagon.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define FOR(i,a,b) for(ll i = a;i < b;i++)
#define pb push_back
#define vll vector<ll>

long long int mod=1e9+7;
int draw_territory(int N, int A, int B,std::vector<int> D, std::vector<int> L) 
{
	ll ans = ((((L[0] + 1) * 1LL * (L[0] + 2)) / 2) % mod);
    ans *= A;
    ans %= mod;
    FOR(i,0,L[0] + 1)
	{
        ans += (((i * (i + 1)) % mod) * B) % mod;
        ans %= mod;
    }
	return ans;
}
# Verdict Execution time Memory Grader output
1 Execution timed out 2059 ms 212 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 2063 ms 212 KB Time limit exceeded
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 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 2074 ms 212 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 2079 ms 212 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -