Submission #587734

# Submission time Handle Problem Language Result Execution time Memory
587734 2022-07-02T09:43:12 Z M_W Hexagonal Territory (APIO21_hexagon) C++17
0 / 100
1305 ms 280 KB
#include <bits/stdc++.h>
using namespace std;
const long long md = 1e9 + 7;

int draw_territory(int N, int A, int B, vector<int> D, vector<int> L) {
	long long len = L[0];
	long long s1 = 0, s2 = 0;
	for(int i = 1; i <= len; i++){
		s1 = (s1 + (((i * 1ll) * ((i + 1) * 1ll)) % md)) % md;
		
		s2 = (s2 + i + 1) % md;
	}
	s1 = (s1 * (A * 1ll)) % md;
	s2 = (s2 * (B * 1ll)) % md;
	s2 = (s2 + (B * 1ll)) % md;
	
	return (s1 + s2) % md;
}
# Verdict Execution time Memory Grader output
1 Incorrect 1205 ms 280 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1305 ms 280 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 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1244 ms 280 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 Incorrect 1223 ms 280 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 -