Submission #981997

# Submission time Handle Problem Language Result Execution time Memory
981997 2024-05-13T17:50:37 Z zh_h Hexagonal Territory (APIO21_hexagon) C++17
0 / 100
1032 ms 416 KB
#include <bits/stdc++.h>
#define lint long long int
#define pb push_back
using namespace std;

const int INF = 1e9;
const int MOD = 1E9+7;

int draw_territory(int N, int A, int B, vector<int> D, vector<int> L){



    lint length = L[0]+1;
    lint sum = 0, times = 0;
    for(lint i = 0; i <= length; i ++){
        sum += ((i*(i+1))%MOD);
        sum %= MOD;
        times += i+1;
    }
    sum *= B;
    sum %= MOD;
    sum += ((times*A)%MOD);
    return sum;
    
}
# Verdict Execution time Memory Grader output
1 Incorrect 1026 ms 416 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1025 ms 408 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1032 ms 412 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1027 ms 408 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -