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 unsigned long long ll; | |
const int maxn = 1e5+10; | |
struct node | |
{ |
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, k, h[1010]; | |
int main() | |
{ | |
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
// NOIC - Problemas da Semana 70 - Avançado | |
// Solução por Samyra Almeida | |
#include <bits/stdc++.h> | |
using namespace std; | |
const int maxn = 1e5+10, root = 340; // declaro maxn e root como constantes, | |
// observe que coloquei o root como 340 pq por alguma razao fica um pouquinho mais rapido quando n e no maximo 10^5 | |
// nos testamos em alguns juizes e ficou mais rapido, mas se quiser usar como 320 fique a vontade. |
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
// NOIC - Problemas da Semana 69 - Intermediário | |
// Solução por Samyra Almeida | |
#include <bits/stdc++.h> | |
using namespace std; | |
const int maxn = 1e5+10, root = 340; // declaro maxn e root como constantes, | |
// observe que coloquei o root como 340 pq por alguma razao fica um pouquinho mais rapido quando n e no maximo 10^5 | |
// nos testamos em alguns juizes e ficou mais rapido, mas se quiser usar como 320 fique a vontade. |
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
// NOIC - Problemas da Semana 69 - Iniciante | |
// Solução por Samyra Almeida | |
#include <bits/stdc++.h> | |
using namespace std; | |
typedef long long ll; | |
int c, n, resp; |
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; | |
#define F first | |
#define S second | |
const int maxn = 2e5+10, maxl = 20; | |
typedef long long ll; |
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; | |
const int maxn = 3e6+10, root = 320, maxv = 1e6; | |
int resp, n, q, v[maxn], f[maxn], ans[maxn], bit[maxn]; | |
struct Q | |
{ |
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> |
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 F first | |
#define S second | |
using namespace std; | |
typedef pair<int, int> pii; | |
const int maxn = 10010, maxl = 20; // declaro os limites | |
// declaro as variáveis que vou utilizar |
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; | |
const int maxn = 110; | |
// declaro as variáveis que vou utilizar | |
int n, m, comp[maxn], mesa[maxn]; | |
vector<int> friends[maxn]; | |
NewerOlder