Submission #979874

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