Skip to content

Instantly share code, notes, and snippets.

View luciocf's full-sized avatar
🦊
Learning

Lúcio Cardoso luciocf

🦊
Learning
View GitHub Profile
@luciocf
luciocf / krtica.cpp
Created February 19, 2019 14:48
COCI 2008/2009
// COCI 2008/2009 - Krtica
// Lúcio Cardoso
#include <bits/stdc++.h>
using namespace std;
const int maxn = 3e5+10;
int n;
@luciocf
luciocf / mag.cpp
Created March 2, 2019 16:36
COCI 2016/2017
// 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;
@luciocf
luciocf / noic-ideia01-ex01.cpp
Created March 5, 2019 02:42
NOIC - Ideia 01 - Exemplo 1
// NOIC - Ideia 1
// Exemplo 1
// Complexidade: O(N log N)
#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5+10;
@luciocf
luciocf / noic-ideia01-ex02.cpp
Last active March 6, 2019 03:02
NOIC - Ideia 01 - Exemplo 2
// NOIC - Ideia 1
// Exemplo 2
// Complexidade: O(K log M)
#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5+10;
@luciocf
luciocf / noic-semana49-intermed.cpp
Last active March 12, 2019 02:42
Noic - Problema da Semana 49 - Nível Intermediário
// 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;
@luciocf
luciocf / noic-semana50-avanc.cpp
Created March 18, 2019 19:24
Noic - Semana 50 - Nível Avançado
// 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
@luciocf
luciocf / noic-s50-intermed-p2.cpp
Last active March 20, 2019 02:49
Noic - Semana 50 - Avançado - Problema 2
// 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];
@luciocf
luciocf / galaksija.cpp
Created March 21, 2019 15:45
COCI 2015/2016
// COCI 2015/2016 - Galaksija
// Lúcio Cardoso
#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5+10;
typedef long long ll;
@luciocf
luciocf / noic-iniciante-s51-p1.cpp
Created April 8, 2019 15:26
Noic - Iniciante - Semana 51 - Problema 1
// 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)
@luciocf
luciocf / noic-iniciante-s50-p1.cpp
Created April 9, 2019 18:27
Noic - Iniciante - Semana 50 - Problema 1
// Noic - Iniciante - Semana 50 - Problema 1
// O(n)
#include <bits/stdc++.h>
using namespace std;
const int maxn = 110;
int l[maxn], r[maxn];