제출 #566954

#제출 시각아이디문제언어결과실행 시간메모리
566954MazaalaiHexagonal Territory (APIO21_hexagon)C++17
3 / 100
1 ms212 KiB
#include "hexagon.h" #include <bits/stdc++.h> using ll = long long; using namespace std; int dx[] = {-1, 0, 1, 1, 0, -1}; int dy[] = {0, 1, 1, 0, -1, -1}; int n, A, B; const int MOD = 1e9 + 7; int draw_territory(int _n, int _A, int _B, std::vector<int> d, std::vector<int> l) { n = _n; A = _A; B = _B; if (n == 3) { ll x = l[0]+1; return ( ( (x+1) * (x) / 2 % MOD * A % MOD) + (B * ( (x * (x+1) / 2) % MOD + x * (x + 1) * (x + x + 1) / 6) % MOD ) )%MOD; } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...