摘要:
Problem A Arrays 思路:水一水。 1 #include<bits/stdc++.h> 2 using namespace std; 3 const int N=1e5+5; 4 int n1,n2,k,m,a[N],b[N]; 5 int main() 6 { 7 scanf("%d 阅读全文
摘要:
Invariance of Tree 题目大意:给你一个有1-n组成的序列p,让你构造一棵树,如果节点a和b之间有一条边,则p[a]和p[b]之间也有一条边。 思路:没啥思路,看了题解菜爆。 我们可以把1-n个数分到若干个集合里边,一个集合里边的元素要满足按顺序转移改变的性质,如果有其中一个集合的元 阅读全文
摘要:
1 #include<bits/stdc++.h> 2 using namespace std; 3 struct point 4 { 5 int x,y; 6 }p1,p2,p3,p4; 7 int cross(const point &a,const point &b,const point & 阅读全文