Skip to content

Instantly share code, notes, and snippets.

sofhiasouza

Block or report user

Report or block sofhiasouza

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View multiplos.cpp
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin >> n;
int cont2 = 0, cont3 = 0, cont4 = 0, cont5 = 0;
View busca_seg.cpp
int st[4*maxn]; //minha segtree de frequencia
int busca_seg(int p, int l, int r, int k)
{
if(l == r) return l; //se l e r são iguais, cheguei no valor que eu queria
int meio = (l+r)/2;
if(st[p*2] >= k) //se meu filho da esquerda tiver pelo menos k valores, o k-esimo esta nele
{
View busca_bit.cpp
int bit[N];
int busca_bit(int v)
{
int sum = 0;
int pos = 0;
for(int i = 30 ; i >= 0 ; i--)
{
if(pos + (1 << i) < N && sum + bit[pos + (1 << i)] <= v)
View restaurante.cpp
#include <bits/stdc++.h>
using namespace std;
int main()
{
int a, b, c, d, e, f;
int cont1 = 0, cont2 = 0;
cin >> a >> b >> c >> d >> e >> f;
if(a == 1 or b == 1 or c == 1) cont1++;
View amarelinha.cpp
#include <bits/stdc++.h>
using namespace std;
int main()
{
int k, resp = 0;
cin >> k;
for(int i = 0 ; i < 5 ; i++)
{
int a, b;
View Avançado-s63.cpp
#include <bits/stdc++.h>
#define pb push_back
#define MAXN 100010
using namespace std;
typedef long long int ll;
int n;
struct pt
{
View Intermediario-s62.cpp
#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5+10;
int n, k, comp[maxn];
int busca(int x)
{
if(comp[x] == x) return x;
View Dist_pontos.cpp
#include <bits/stdc++.h>
using namespace std;
struct ponto
{
int x, y;
double dist(ponto q)
{
int r1 = x - q.x;
View Repr_ponto.cpp
#include <bits/stdc++.h>
using namespace std;
struct ponto
{
int x, y;
};
int main()
{
View Quase_primo.cpp
#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
{
You can’t perform that action at this time.