![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
题解
不会AC的鹏
低调学习。AC AC
展开
-
POJ - 1703 Find them, Catch them
题目链接:POJ-1703并查集的变形应用建立两个数组,a[ ]用来表示双亲结点,b[ ]来表示与x不同的帮派的编号,只需要一个就够了,应为一个通过 函数find可以找的他的parent。part 1 建立找双亲的函数 findx()int findx(int x){ if(x!=a[x]) { a[x]=findx(a[x]); } ...原创 2019-07-29 16:53:57 · 108 阅读 · 1 评论 -
SDUT-2506 完美网络
AC代码(c++)#include <iostream>using namespace std;#include <bits/stdc++.h>#include <queue>int main(){ int st[12000]; queue<int>q; int t; cin>>t; ...原创 2019-07-30 14:45:28 · 83 阅读 · 2 评论 -
Gym - 100985 团队赛题解
A - MaratonIME helps Pablito题意:家族人员都有相应的共同的公因数(包含本身),不同家族的成员没有相同的公因数。AC代码(c++):#include <iostream>using namespace std;#include <bits/stdc++.h>int main(){ int t; cin>&...原创 2019-07-27 20:39:55 · 488 阅读 · 1 评论 -
Gym-102299 I Sobytiynyy Proyekt Casino
题目链接:Gym-102299 I题意:玩家拿一个x值,可以选择支付y值退出,也可以选择不支付继续向下,但当到最后一个时,必须支付y值退出。问在最小的利益排序下,玩家能赚到的最大利益!#include <iostream>#include <bits/stdc++.h>const long long int minn=-1e9-1;typedef long l...原创 2019-08-21 19:59:23 · 268 阅读 · 0 评论