Skip to content

Instantly share code, notes, and snippets.

@angshn
angshn / algo
Created March 5, 2024 14:57
algorithm template
#include <iostream>
#define ll long long int
#define FASTIO \
ios ::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
using namespace std;
const int N = 2e5 + 5;
const int INF = 0x3f3f3f3f;
int n;
@angshn
angshn / cpp
Created August 10, 2021 13:14
pat-ad-1118
#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e4 + 5;
int fa[maxn];
set<int> birds;
void init()
{
for (int i = 0; i < maxn; i++)
fa[i] = i;
}
@angshn
angshn / cpp
Created March 18, 2021 13:16
lq287
#include <iostream>
#include <cctype>
#include <cstring>
using namespace std;
char str[205];
bool isParted(int x,int y){