Submission #979882

#TimeUsernameProblemLanguageResultExecution timeMemory
979882vjudge1Hexagonal Territory (APIO21_hexagon)C++17
9 / 100
1 ms436 KiB
#include "hexagon.h" #include <bits/stdc++.h> #include <vector> #define debu(x) (cerr << #x << " = "<< x << "\n") #define moddy 1000000007 using namespace std; int draw_territory(int N, int A, int B, std::vector<int> D, std::vector<int> L) { #define int __int128 int leng = L[0] + 1; leng %= moddy; //:)) int ans = leng * ((leng + 1) %moddy) * (2 * leng + 1)/6; ans -= leng*(leng + 1)/2; ans *= B; //debu(ans); ans += A * (leng * (leng + 1))/2; //debu(ans); #undef int return (ans%moddy); }
#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...