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 <string.h> | |
#define TABLERO 4 | |
/* | |
Program: Boggle | |
Encoded by Michael Serrato. | |
*/ | |
int N; | |
char tablero[5][5]; | |
int mapa[5][5] = {0}; /* Mapa: Sirve como auxiliar |
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; | |
int N, M; | |
int raiz[1000015]; | |
int rango[1000015]; | |
int encontrar(int n) { | |
if( raiz[n] == n ) | |
return n; | |
else raiz[n] = encontrar( raiz[n] ); | |
return raiz[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 MAXN 28 | |
#define MAXM 52 | |
#define printMatrix(matrix, n, m)\ | |
for (int x = 0; x <= n; ++x) {\ | |
for (int y = 0; y <= m; ++y) {\ | |
cout << matrix[x][y] << " ";\ | |
}\ | |
cout << endl;\ | |
} |
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 MAXN 200001 | |
#define printArray(array, n)\ | |
for (int x = 0; x < n; ++x) {\ | |
cout << array[x] << " ";\ | |
}\ | |
cout << endl; | |
#define view(x) cout<<#x<<": "<<x<<endl; | |
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 <cstdio> | |
#include <algorithm> | |
#include <iostream> | |
#include <map> | |
#include <vector> | |
#include <utility> | |
#define optimize ios_base::sync_with_stdio(0);cin.tie(0); | |
#define all(v) v.begin(), v.end() | |
#define first(v, n) v.begin(), v.begin()+n | |
#define second(v, n) v.begin()+n, v.begin()+(2*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 PB push_back | |
#define MP make_pair | |
#define X first | |
#define Y second | |
#define sz size | |
#define PS push | |
using namespace std; | |
typedef long long int lli; | |
int 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 X first | |
#define Y second | |
#define sz size | |
using namespace std; | |
typedef long long int lli; | |
int C,N; | |
lli Limite = 0; | |
lli AC = 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 <iostream> | |
#include <cstring> | |
#include <cstdio> | |
#include <algorithm> | |
#define MAXN 100005 | |
#define REP(i,x,y)\ | |
for(i=((int) x); i<=((int) y); ++i){ | |
#define END } | |
using namespace std; | |
int 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 <iostream> | |
using namespace std; | |
unsigned long long int N; | |
int main(){ | |
cin>>N; | |
if(N%10==0) | |
cout<<2<<"\n"; | |
else | |
cout<<1<<"\n"<<N%10<<"\n"; | |
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 <bits/stdc++.h> | |
using namespace std; | |
typedef long long int lli; | |
int N; | |
lli sum = 0; | |
lli x,m,y,a,b; | |
int main(){ | |
ios_base::sync_with_stdio(0); | |
cin.tie(0); | |
int i; |
OlderNewer