Skip to content

Instantly share code, notes, and snippets.

#include <iostream>
#include <string>
#include <vector>
#include <cstdio>
using namespace std;
string A[110], B[110];
int LCS[110][110] = {0};
int pre[110][110];
#include <cstdio>
#include <vector>
#include <algorithm>
using namespace std;
struct Edge{
int A;
int B;
int Len;
}E[15001];
int Set[2001];
#include <cstdio>
#include <vector>
#include <algorithm>
using namespace std;
struct Edge{
int A;
int B;
int Len;
}E[15001];
int Set[2001];
#include <cstdio>
#include <vector>
#include <algorithm>
using namespace std;
struct Edge{
int A;
int B;
int Len;
}E[15001];
int Set[1001];
#include <cstdio>
using namespace std;
// Method 1
int main()
{
int N;
scanf("%d", &N);
int num[1001], LIS[1001];
int Max = 0;
for (int i = 0; i < N; ++i) {
#include <cstdio>
#include <cmath>
#include <algorithm>
using namespace std;
struct Point{
int x;
int y;
}P[751];
struct Edge{
int A;
#include <cstdio>
using namespace std;
int N, M;
int Set[2 * 100005];
void Initial(int N);
int Find_Root(int x);
void SetEnemy(int x, int y);
void Union(int x, int y);
#include <cstdio>
#include <map>
#include <vector>
#include <algorithm>
using namespace std;
struct Edge{
int A;
int B;
int W;
#include <cstdio>
#include <cmath>
#include <algorithm>
using namespace std;
struct Point{
int X;
int Y;
}point[501];
struct Edge {
int a_index;
#include <cstdio>
#include <cmath>
#include <algorithm>
using namespace std;
struct point{
double x;
double y;
}P[105];
struct edge {
int i_a;