This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import random | |
base_string = """ | |
{N} | |
{arr} | |
""".strip(" \t\n\r") | |
num_subtareas = 4 | |
puntos_por_subtarea = [20, 20, 15, 45] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#define IZQ (nodo * 2) | |
#define DER (nodo * 2 + 1) | |
#define lld long long int | |
using namespace std; | |
const int MAXN = 1000002; | |
int n; | |
lld C[MAXN], f[MAXN]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <set> | |
#include <string> | |
#include <vector> | |
#define optimizar ios_base::sync_with_stdio(0); cin.tie(0) | |
#define lld long long int | |
using namespace std; | |
const int MAXN = 100002; | |
const int LOG_N = 20; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <set> | |
#include <string> | |
#include <vector> | |
#define optimizar ios_base::sync_with_stdio(0); cin.tie(0) | |
#define lld long long int | |
using namespace std; | |
const int MAXN = 100002; | |
const int LOG_N = 20; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bits/stdc++.h> | |
#define optimizar ios_base::sync_with_stdio(0); cin.tie(0) | |
#define lld long long int | |
#define MAXN 100002 | |
using namespace std; | |
lld resp; | |
lld n, m; | |
lld a, b; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bits/stdc++.h> | |
#define optimizar ios_base::sync_with_stdio(0); cin.tie(0) | |
#define lld long long int | |
using namespace std; | |
const int MAXN = 100002; | |
const int LOG_N = 20; | |
int n, Q, root; | |
vector < int > adj[MAXN]; | |
int depth[MAXN], padre[MAXN][LOG_N]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bits/stdc++.h> | |
#define optimizar ios_base::sync_with_stdio(0); cin.tie(0) | |
#define MAXN 202 | |
#define lld long long int | |
#define IZQ (nodo * 2) | |
#define DER (nodo * 2 + 1) | |
using namespace std; | |
int n, m; | |
char car[MAXN][MAXN]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bits/stdc++.h> | |
#define lld long long int | |
#define IZQ (nodo * 2) | |
#define DER (nodo * 2 + 1) | |
using namespace std; | |
const int MAXN = 200002; | |
const lld INF = (1ll << 60); | |
int n; | |
int arr[MAXN]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bits/stdc++.h> | |
#define lld long long int | |
#define IZQ (nodo * 2) | |
#define DER (nodo * 2 + 1) | |
using namespace std; | |
const int MAXN = 100002; | |
const int INF = (1 << 30); | |
int n; | |
bool bucket[MAXN]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bits/stdc++.h> | |
using namespace std; | |
const int MAXN = 50002; | |
const int LOG_N = 18; | |
int n, m; | |
vector < int > adj[MAXN]; | |
int padre[MAXN][LOG_N], depth[MAXN]; | |
int sol[MAXN]; |
NewerOlder