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
// COCI 2008/2009 - Krtica | |
// Lúcio Cardoso | |
#include <bits/stdc++.h> | |
using namespace std; | |
const int maxn = 3e5+10; | |
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
// COCI 2016/2017 - Mag | |
// Lúcio Cardoso | |
#include <bits/stdc++.h> | |
using namespace std; | |
const int maxn = 1e6+5; | |
int num[maxn], P=-1, Q=-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
// NOIC - Ideia 1 | |
// Exemplo 1 | |
// Complexidade: O(N log N) | |
#include <bits/stdc++.h> | |
using namespace std; | |
const int maxn = 1e5+10; |
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 - Ideia 1 | |
// Exemplo 2 | |
// Complexidade: O(K log M) | |
#include <bits/stdc++.h> | |
using namespace std; | |
const int maxn = 1e5+10; |
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 - Semana 49 - Intermediário | |
// Complexidade: O(n) | |
#include <bits/stdc++.h> | |
using namespace std; | |
const int maxn = 1e5+10; | |
const int maxv = 1e6+10; |
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 - Semana 50 - Avançado | |
// Complexidade: O(N*V) | |
#include <bits/stdc++.h> | |
using namespace std; | |
const int maxn = 110; | |
const int maxv = 1e5+10; // maior resposta possível |
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 - Semana 50 - Intermediário - Problema 2 | |
// Complexidade: O(N * log_10 N) | |
#include <bits/stdc++.h> | |
using namespace std; | |
const int maxn = 10010; | |
int dist[maxn]; |
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
// COCI 2015/2016 - Galaksija | |
// Lúcio Cardoso | |
#include <bits/stdc++.h> | |
using namespace std; | |
const int maxn = 1e5+10; | |
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
// Noic - Iniciante - Semana 51 - Problema 1 | |
// Complexidade: O(n^3) | |
#include <bits/stdc++.h> | |
using namespace std; | |
string s; | |
bool check(int a, int b) |
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 - Iniciante - Semana 50 - Problema 1 | |
// O(n) | |
#include <bits/stdc++.h> | |
using namespace std; | |
const int maxn = 110; | |
int l[maxn], r[maxn]; |
OlderNewer