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 inf 1000000000 | |
using namespace std; | |
int main() | |
{ | |
int n, k, vet[10010], dif[10010]; | |
cin >> n >> k; | |
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 100010 | |
using namespace std; | |
int main() | |
{ | |
int n, vet[MAXN], k; | |
cin >> n; | |
for(int i = 0 ; i < n ; i++) |
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 100010 | |
using namespace std; | |
int n, m, pontos[MAXN], comp[MAXN]; | |
inline int find(int x) | |
{ | |
if(comp[x] == x) return x; | |
return comp[x] = find(comp[x]); |
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 <set> //biblioteca do set | |
using namespace std; | |
int main(){ | |
set<int> t; | |
t.insert(5); //Adiciona o elemento 5 no set | |
t.insert(12); //Adiciona o elemento 12 no set | |
} |
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 <set> //biblioteca do set | |
using namespace std; | |
int main(){ | |
set<int> t; //cria um set que armazena valores inteiros | |
} |
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 <set> //biblioteca do set | |
using namespace std; | |
int main(){ | |
set<int> t; | |
t.insert(5); | |
t.insert(12); |
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> //biblioteca do set | |
using namespace std; | |
int main(){ | |
set<int> t; | |
t.insert(5); | |
t.insert(12); |
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> //biblioteca do set | |
using namespace std; | |
int main(){ | |
set< int > t; | |
for(int i = 10 ; i >= 1 ; i--) | |
t.insert(i); |
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 100010 | |
#define inf 1000000 | |
using namespace std; | |
int n, bit[MAXN]; | |
struct cmpt | |
{ | |
int a, b, c; |
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 K 45 | |
using namespace std; | |
typedef long long int ll; | |
int n, k, p[K], soma; | |
inline void f(int i, ll mult, int qnt) //indice atual, valor atual, quantidade de fatores na multiplicacao | |
{ |
OlderNewer