F. Microcycle(并查集+思维)

链接:https://codeforces.com/contest/1927/problem/F

思路:题意是找一个拥有最小边权的环,首先是确定怎么找环,可以用并查集维护一下,如果两点不在一个集合里则将两点合并,如果新找的边的两个点本身就在一个集合,那么这条边可以构成一个环。我们将边权从大到小排序后通过上面所说的遍历所有的边,每次找到新的第二种情况,就把此边当环的最小边权。结束后最终的得到的就是环的最小边权,两点为u,v。然后我们将除这条边的其他边去建图,然后用pre数组去维护路径,最终找到一条新的从u到v的路径就是答案。

#include <bits/stdc++.h>
#define int long long
#define endl '\n'
#define x first
#define y second
#define pb push_back
using namespace std;
typedef pair<int, int>PII;
int n, m, ed;
map<int, int>mp;
struct edge{
    int x,y,w;
}a[200005];
int p[200005];
vector<int>g[200006],vis(200005),pre(200050);
int find(int x){
    return x==p[x]?p[x]:(p[x]=find(p[x]));
}
bool merge(int x,int y){//判断两点是否已经是一个集合了
    int u=find(x);
    int v=find(y);
    if(u==v)return true;//如果是,则这条边可以和这个集合的某些点构成环
    p[u]=v;//将两点合并到同一集合
    return false;//这条边目前无法构成环
}
void dfs(int x){
    
    for(auto v:g[x]){
        if(vis[v])continue;
        pre[v]=x;vis[x]=1;
        dfs(v);
    }
}
void solve () {
    cin>>n>>m;
    for(int i=1;i<=n;i++)p[i]=i,g[i].clear(),vis[i]=0,pre[i]=-1;//初始化
    for(int i=1;i<=m;i++){
        int x,y,z;
        cin>>x>>y>>z;
        a[i]={x,y,z};
    }
    sort(a+1,a+m+1,[](edge x,edge y){//从大到小排序,每次找到的可以构成环的边权逐渐变小
        return x.w>y.w;
    });
    int mi=1e18,id=-1;
    for(int i=1;i<=m;i++){
        if(merge(a[i].x,a[i].y)){//如果是,则这条边可以和这个集合的某些点构成环
            mi=a[i].w;
            id=i;
        }
    }
    for(int i=1;i<=m;i++){
        if(id!=i){
            g[a[i].x].pb(a[i].y);
            g[a[i].y].pb(a[i].x);
        }
    }
    cout<<mi<<" ";vis[a[id].x]=1;
    // cerr<<a[id].x<<" "<<a[id].y<<endl;
    dfs(a[id].x);
    vector<int>ans;
    for(int i=a[id].y;i!=-1;i=pre[i]){
        ans.pb(i);
    }
    cout<<ans.size()<<endl;
    for(auto v:ans)cout<<v<<" ";
    cout<<endl;
}
signed main () {
    int T = 1; 
    std::ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
    cin>>T;
    while (T --) solve ();
    return 0;
}

Rab GTPases serve as master regulators of membrane trafficking. They can be activated by guanine nucleotide exchange factors (GEF) and be inactivated by GTPase-activating proteins (GAPs). The roles of some GAPs have been explored in Saccharomyces cerevisiae, but are largely unknown in filamentous fungi. Here, we investigated the role of GAP Gyp3 gene, an ortholog of S. cerevisiae Gyp3, in an entomopathogenic fungus, Metarhizium acridum. We found that MaGyp3 is mainly localized to the endoplasmic reticulum (ER) of vegetative hyphae, nuclei of mature conidia, and both ER and nuclei in invasive hyphae. Lack of MaGyp3 caused a decreased tolerance to hyperosmotic stress, heat-shock and UV-B radiation. Moreover, the ΔMaGyp3 mutant showed a significantly decreased pathogenicity owing to delayed germination, reduced appressorium-mediated penetration and impaired invasive growth. Loss of MaGyp3 also caused impaired fungal growth, advanced conidiation and defects in utilization of carbon and nitrogen sources, while overexpression of MaGyp3 exhibited delayed conidiation on nutrient-rich medium and conidiation pattern shift from microcycle conidiation to normal conidiation on nutrient-limited medium. Mavib-1, a tanscription factor invloved in conidiation by affecting nutrient utilizaiton, can directly bind to the promoter of MaGyp3. ΔMaGyp3 and ΔMavib-1 mutants shared similar phenotypes, and overexpression mutants of MaGyp3 and Mavib-1 (Mavib-1-OE) exhibited similar phenotypes in growth, conidiation and pathogenicity. Reintroduction of the Magyp3 driven by strong promoter gpd in ΔMavib-1 mutant recovered the defects in growth and conidiation for dysfunction of Mavib1. Taken together, our findings uncovered the role of GAP3 in a filamentous pathogenic fungus and and illustrated the upstream regulatory mechanism by direct interaction with Mavib-1.
02-10
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值