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
// Horses - IOI 2015 P1 Day 2 | |
// O(Q*log(10⁹)*log(N)) | |
// Matheus Leal | |
#include <bits/stdc++.h> | |
#define mod 1000000007LL | |
#define N 500050 | |
#define l (2*nod) | |
#define ri (2*nod + 1) | |
#define mid ((a + b)/2) |
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
// Miners IOI 2007 | |
// Time O(4⁴*N) Memory O (4⁵) | |
// Matheus Leal | |
#include <bits/stdc++.h> | |
#define N 100050 | |
using namespace std; | |
int n, v[N], dp[4][4][4][4][4]; | |
string s; |
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
// Game IOI 2013 | |
// O(Q*log²(N)) | |
// Matheus Leal | |
#include <bits/stdc++.h> | |
#define mid ((a+b)/2) | |
#define llg long long int | |
using namespace std; | |
struct node1d |
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
// Doodle - Seletiva IOI 2015/2016 | |
// O(N*log²(N)) | |
// Matheus Leal Viana | |
#include <bits/stdc++.h> | |
#define f first | |
#define s second | |
using namespace std; | |
typedef pair<pair<int, int>, pair<int, int> > line; |
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
//Estacao - Seletiva IOI - 2015 | |
#include <bits/stdc++.h> | |
#define N 2*100050 | |
using namespace std; | |
int n, m, grau[N], save[N], nivel[N]; | |
vector<int> grafo[N], lista, P, I; | |
int solve() | |
{ |
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
// Inversor Seletiva IOI 2015 | |
// O(N) | |
// Matheus Leal V | |
#include <bits/stdc++.h> | |
#define N 100050 | |
#define inf 10000000000000000LL | |
#define mid ((a + b)/2) | |
#define l (2*nod) | |
#define r (2*nod + 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
// Permutação - Seletiva IOI 2015 | |
// O(N*log(N)) | |
// Matheus Leal V | |
#include <bits/stdc++.h> | |
#define N 1000050 | |
using namespace std; | |
int n, ini[N], fim[N]; | |
vector<int> pos[N], k, 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
// Trafego - Seletiva IOI 2015 | |
// O(N*log(N)) | |
// Matheus Leal V | |
#include <bits/stdc++.h> | |
#define N 50050 | |
#define mp make_pair | |
#define f first | |
#define s second | |
#define pb push_back |
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
// Caminho - Seletiva IOI 2016 | |
// O(n²*α(n²)) | |
// Matheus Leal V | |
#include <bits/stdc++.h> | |
#define N 400 | |
#define f first | |
#define s second | |
#define mp make_pair | |
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 <bits/stdc++.h> | |
#define N 1020 | |
// Serrote - Seletiva IOI 2016 | |
// O(N*K) | |
// Matheus Leal V | |
#define llg long long int | |
using namespace std; | |
llg n, k, dp[N][N], MOD = 1000000007; |
OlderNewer