Submission #598663

# Submission time Handle Problem Language Result Execution time Memory
598663 2022-07-18T16:35:01 Z Jomnoi Hexagonal Territory (APIO21_hexagon) C++17
3 / 100
1 ms 336 KB
#include <bits/stdc++.h>
#include "hexagon.h"
using namespace std;

const int M = 1e9 + 7;
const int D2 = 500000004;
const int D3 = 333333336;

int draw_territory(int N, int A, int B, vector <int> D, vector <int> L) {
    long long l = L[0] + 1;
    return ((l * l % M + l) * D2 % M * A % M + (l * l % M * l % M + 2 * l) * D3 % M * B % M) % M;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 1 ms 308 KB Output is correct
4 Correct 1 ms 216 KB Output is correct
5 Correct 1 ms 216 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Incorrect 1 ms 212 KB Output isn't correct
4 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 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Incorrect 1 ms 304 KB Output isn't correct
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 328 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 304 KB Output is correct
3 Incorrect 1 ms 212 KB Output isn't correct
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 336 KB Output isn't correct
2 Halted 0 ms 0 KB -