# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
401960 | rama_pang | Sum Zero (RMI20_sumzero) | C++17 | 702 ms | 17920 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
const int BASE = 32;
const int LOG32 = 4;
int pow32[LOG32];
int dp[400005][LOG32];
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
pow32[0] = 1;
for (int i = 1; i < LOG32; i++) {
pow32[i] = BASE * pow32[i - 1];
}
int N;
cin >> N;
vector<int> A(N);
for (int i = 0; i < N; i++) {
cin >> A[i];
}
// dp[i][x] = minimum j, such that [i, j - 1] contains 6^x valid segments
{ // Compute dp[]
for (int i = 0; i <= N + 1; i++) {
for (int j = 0; j < LOG32; j++) {
dp[i][j] = N + 1;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |