Submission #1004881

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
10048812024-06-21 21:22:50vjudge1Liteh and Newfiteh (INOI20_litehfiteh)C++17
100 / 100
178 ms315476 KiB
#include <bits/stdc++.h>
#define int long long
// #define ll long long
#define pii pair<int, int>
#define all(v) v.begin(), v.end()
using namespace std;
const int oo = 1e9 + 9;
const int MAX = 1e5 + 5, LOGMAX = 20, B = 800, MOD = 1e9 + 7;
int n;
int arr[MAX];
int dp[MAX][LOGMAX][LOGMAX];
int dp2[MAX];
void solve(){
cin >> n;
for(int i = 1; i <= n; i++) cin >> arr[i];
for(int i = 0; i < MAX; i++){
for(int j = 0; j < LOGMAX; j++){
for(int k = 0; k < LOGMAX; k++){
dp[i][j][k] = oo;
}
}
}
for(int i = 1; i <= n; i++){
dp[i][0][arr[i]] = 0;
dp[i][0][arr[i] - 1] = 1;
}
for(int i = n; i >= 1; i--){
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...