This file contains hidden or 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> | |
using namespace std; | |
#define MAX_ARRAY 750 | |
#define op_io ios_base::sync_with_stdio(0);cin.tie(0); | |
int res[MAX_ARRAY]; | |
int res_size = 1; | |
void multiplica(){ |
This file contains hidden or 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; | |
typedef unsigned long long ULL; | |
ULL n,t,a,b,d,suma; | |
int main(){ | |
cin>>n; | |
cin>>t; | |
suma = 0; | |
while(n--){ |
This file contains hidden or 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 <queue> | |
#define op_io ios_base::sync_with_stdio(0);cin.tie(0); | |
using namespace std; | |
int main(){ | |
op_io | |
int n,c; | |
cin>>c>>n; | |
char comando; |
This file contains hidden or 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
/* | |
Problema recopilado de: | |
https://omegaup.com/arena/problem/Nieves-y-el-merge-sort#problems | |
*/ | |
#include <iostream> | |
using namespace std; | |
#define op_io ios_base::sync_with_stdio(0);cin.tie(0); | |
void mezclar(long long int A[],int l,int m,int r){ | |
int n1 = m - l + 1; | |
int n2 = r-m; |
This file contains hidden or 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
/* | |
Kadane's Algorithm | |
*/ | |
#include <iostream> | |
using namespace std; | |
#define op_io ios_base::sync_with_stdio(0);cin.tie(0); | |
int maximaSuma(int A[],int n){ | |
int curr=0; | |
int maxSum = 0; | |
for(int i=0;i<n;i++){ |
This file contains hidden or 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> | |
using namespace std; | |
#define op_io ios_base::sync_with_stdio(0);cin.tie(0); | |
typedef unsigned long long int ULL; | |
ULL ceros(ULL n){ | |
if(n<=1){ | |
return 0; | |
} | |
return n/5 + ceros(n/5); |
This file contains hidden or 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 <algorithm> | |
using namespace std; | |
#define op_io ios_base::sync_with_stdio(0);cin.tie(0); | |
#define MAX_NAVES 100002 | |
#define MAX_K 1002 | |
typedef unsigned long int UL; | |
struct punto{ | |
UL x; |
This file contains hidden or 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 op_io ios_base::sync_with_stdio(0);cin.tie(0); | |
using namespace std; | |
bool posible(int A[],int hi,int dias,int n){ | |
int suma = 0; | |
int curr_dias = 1; | |
for(int i=0;i<n;i++){ | |
if(A[i] > hi) return false; | |
if(suma + A[i] <= hi){ |
This file contains hidden or 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 op_io ios_base::sync_with_stdio(0);cin.tie(0); | |
using namespace std; | |
typedef long long int LLI; | |
struct Pila{ | |
LLI altura; | |
LLI posicion; | |
}; | |
Pila _Pila[1000002]; |
This file contains hidden or 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 <cstdlib> | |
#include <cstring> | |
#define MAX_N 10000 | |
using namespace std; | |
char S[MAX_N]; | |
int Operaciones[MAX_N]; | |
int jerarquia(char op){ | |
if(op == '*' || op=='/') return 2; |
OlderNewer