Skip to content

Instantly share code, notes, and snippets.

View lawrencefmm's full-sized avatar
🏠
Working from home

Lawrence Melo lawrencefmm

🏠
Working from home
  • Fortaleza, CE
View GitHub Profile
Chat Fun() // #A Wrapper type Chat containing the promise type
{
co_yield "Olá!\n"s; // #B Calls promise_type.yield_value
std::cout << co_await std::string{}; // #C Calls promise_type.await_transform
co_return "Aqui!\n"s; // #D Calls promise_type.return_value
}
int main()
#include<bits/stdc++.h>
using namespace std;
int main() {
int n;
string s;
cin >> n;
cin >> s;
#include <bits/stdc++.h>
using namespace std;
#define MID ((l + r)/2)
struct node
{
node *left, *right;
int sum;
#include <bits/stdc++.h>
using namespace std;
#define MID ((l + r)/2)
#define LEFT ((2*no))
#define RIGHT ((2*no) + 1)
const int MAXN = 3e5 + 10;
struct node
{
#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5;
#define LEFT (2*node)
#define RIGHT ((2*node) + 1)
#define MID ((l + r)/2)
int tree[3*maxn], v[maxn];
#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e4 + 10;
#define int long long
typedef pair<int, int> pi;
typedef pair<int, pi> pii;
int vis[maxn], min_len[maxn], n, m, k;
pi dist[maxn];
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
mt19937 rd(random_device{}());
ll mul(ll a, ll b, ll c)
{
return __int128(a)*b%c;
}
bool checa_primalidade(int n)
{
for(int i = 2; i*i <= n; i++)
{
if(n % i == 0) return false;
}
return true;
}
#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 10;
bool composto[maxn];
int n;
vector<int> p[maxn];
#include <bits/stdc++.h>
using namespace std;
const int maxn = 5e5 + 10;
int n, q, pref[maxn], v[maxn];
int main()
{
ios::sync_with_stdio(false), cin.tie(nullptr);