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 <vector> | |
#include <algorithm> | |
#include <cstring> | |
using namespace std; | |
int grupo [] = { 0, 2 , 1}; | |
struct pelea{ | |
int destino; | |
int ronda; |
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 MXCOINS 7500 | |
using namespace std; | |
int c[] ={1, 5, 10, 25, 50}; | |
int mem[MXCOINS][6]; | |
int change(int mon, int i){ | |
if(mon == 0){ | |
return 1; | |
} | |
if(i == 5){ |
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> | |
using namespace std; | |
int l[1001]; | |
int m[1002][1002]; | |
int N; | |
int lis(int u, int i){ | |
if(i == N+1) | |
return 0; | |
if(m[u][i] != -1) |
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 MOD 1000000000 | |
using namespace std; | |
long long int l[1001]; | |
int m[1002][3]; | |
int N; | |
long long int hmw(int i, int ac){ | |
if(i == N+1) | |
return 0; |
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 <cstring> | |
using namespace std; | |
char game[55]; | |
int n; | |
int main() { | |
while(scanf("%s",game) != EOF){ | |
n = strlen(game); | |
int t = 0, j = 0; | |
char ex = 1; |
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 <algorithm> | |
#include <stdio.h> | |
#include <cstring> | |
#define MAX 109 | |
using namespace std; | |
char mapa[MAX][MAX]; | |
int visita[MAX][MAX]; | |
int n, m, T, i, j, c; | |
void cuenta(int x, int y, int v){ | |
if(x < 0 || y < 0 || x >= n || y >= m) |
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 <cstring> | |
#include <algorithm> | |
#define MAXW 1010 | |
using namespace std; | |
int m[MAXW][MAXW]; | |
char a[MAXW]; | |
char b[MAXW]; | |
int la; | |
int lb; |
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
int grupo [] = { 0, 2 , 1}; | |
bool dfs(int nodo, int gpo){ | |
if(visita[nodo] > 0){ | |
if(visita[nodo] == gpo){ | |
return true; | |
} | |
return false; | |
} | |
visita[nodo] = gpo; |
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 <cstdio> | |
#include <vector> | |
#include <algorithm> | |
#define MAXN 1002 | |
using namespace std; | |
int root(int n); | |
bool join(int n01, int n02); | |
int M,N; | |
int padres[MAXN]; | |
struct cable{ |
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 <cstdio> | |
#include <queue> | |
#include <vector> | |
#include <algorithm> | |
#define MAXN 1002 | |
#define INF 1<<30 | |
using namespace std; | |
int N, E, S, T; | |
int A, B, C, D; | |
void iniciar(); |