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 <stdio.h> | |
using namespace std; | |
int nextPermutation(int v) { | |
int t= (v | (v-1) ) +1; | |
int w= t | (( ( (t&-t) / (v &-v) ) >> 1) -1); | |
return w; | |
} |
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 <stdio.h> | |
#define MAXN 100002 | |
#define MAXBIT 200020 | |
#define LOG_MAXN 20 | |
#include <vector> | |
#include <map> | |
using namespace std; | |
int n, m; | |
int saltos[MAXN][LOG_MAXN+5]; | |
int bit[MAXBIT]; |
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 <stdio.h> | |
#include <vector> | |
#define lld long long int | |
#define MAXN 100002 | |
#define LIMITE 1000000007 | |
using namespace std; | |
lld resp; | |
lld n, m; | |
lld nodos, aristas; |
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 <stdio.h> | |
#define MAXN 1000002 | |
#define LOG_MAXN 22 | |
using namespace std; | |
struct ura { | |
char letra; | |
int tam; | |
int saltos[LOG_MAXN]; | |
}; | |
ura tiempo[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 <stdio.h> | |
#include <algorithm> | |
#define MAXN 35 | |
#define lld long long int | |
#define CONBINACIONES 200002 | |
using namespace std; | |
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 <stdio.h> | |
#include <algorithm> | |
#define MAXN 1000005 | |
using namespace std; | |
int n; | |
struct ura { | |
int ini; | |
int fin; | |
int boletos; | |
}; |
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 <stdio.h> | |
#define MAXN 52 | |
#define INF 100000000 | |
using namespace std; | |
int n, m, k; | |
int camino[MAXN][MAXN]; | |
bool ocupado[MAXN]; | |
int min(int a, int b) { | |
return a < b ? 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 MAXN 102 | |
using namespace std; | |
int n, m; | |
int counth; | |
map < string, int > mapeo; | |
bool pto[MAXN]; | |
vector < int > lista[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
/* | |
ID: | |
PROG: money | |
LANG: C++ | |
*/ | |
#include <bits/stdc++.h> | |
#define MAXM 27 | |
#define MAX_VALUE 10002 | |
#define lld long long int | |
using namespace std; |
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 <math.h> | |
#include <algorithm> | |
#include <vector> | |
#include <stack> | |
#include <queue> | |
#include <set> | |
#include <map> | |
#define optimizar ios_base::sync_with_stdio(0); cin.tie(0) | |
#define lld long long int |
OlderNewer