Submission #254123

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
2541232020-07-29 11:41:30rama_pangCoins (LMIO19_monetos)C++14
0 / 100
157 ms262148 KiB
#include <bits/stdc++.h>
using namespace std;
const int MAXN = 80;
const int INF = 1e8;
int N, K1, K2;
int A[305][305];
int ans[305][305];
int L[MAXN][MAXN];
int dp[MAXN][MAXN][MAXN * MAXN / 2];
array<int, 3> pr[MAXN][MAXN][MAXN * MAXN / 2];
void Solve() {
int shift = max(1, N / 75);
int NN = N / shift;
for (int i = 1; i <= N; i++) {
for (int j = 1; j <= N; j++) {
int di = (i + shift - 1) / shift;
int dj = (j + shift - 1) / shift;
L[di][dj] += A[i][j];
}
}
for (int i = 1; i <= NN; i++) {
for (int j = 1; j <= NN; j++) {
L[i][j] += L[i][j - 1];
}
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...