跳到正文

YellowBean_Elsa

104292

You find me waiting in the wings......

在洛谷打开
资料、奖项与版本

资料

编号
104292
抓取

奖项

2021 NOIP
二等奖
2019 CSP-J
一等奖

205864713

为洛谷点赞

AOPS

OI-Wiki 数学

517

Dilworth

LaTeX

蓝月升空! City三冠王!

-Why\text{Why} is\text{is} a\text{a} ravenraven like a writing desk?\text{like a writing desk?}

—— Alice Kingsleigh X Tarrent Hightopp\text{Alice Kingsleigh X Tarrent Hightopp}

Plus\text{Plus} Est\text{Est} En\text{En} Vous\text{Vous}

Revolute Incantation\text{Revolute Incantation}:

代码
Revolving moon and spinning sun, forged a crescent blade. 
From light and dark within the heart, the shining sword was made.
The curving arc of Revolute, shimmerd in his hand.

HealingHealing IncantationIncantation:

代码
Flower gleam and glow, let your power shine.
Make the clock reverse, bring back what once was mine.
Heal what has been hurt, change the fate's design.
Save what has been lost, bring what once was mine.
What once was mine.

DecayingDecaying IncantationIncantation:

代码
Wither and decay, end this destiny. 
Break these earthly chains, and set the spirit free.
The spirit free.

MoonstoneMoonstone UltimateUltimate IncantationIncantation:

代码
Crescent high above, evolving as you go!
Raise what lies beneath, and let the darkness grow.
Bend it to my will, consume the sunlight's glow.
Rise into the sky, and let the darkness show.

SundropSundrop UltimateUltimate IncantationIncantation:

代码
Power of the sun, gift me with your light.
Shine into the dark, restore our fading sight.
Rise into the dawn, blazing star so bright.
Burn away the strife, let my hope ignite.
Let hope ignite!

6.1.2020:AC 300,提交 1000 祭

7.15.2020 YellowBean 官宣 AFOAFO(成为了MOer,但以后还会常来洛谷!)

10.22.2021 省一祭(MO)

11.18.2021 更名祭 OI生命的倒数第三天

东风夜放搜索树,更吹落,WA如雨。 跑TarjanAC满路,评测机动,碧绿光转,一夜AK舞。

C++
#include<bits/stdc++.h>
using namespace std;
int read()
{
    char ch=getchar();
    int x=0;
    while(ch<'0'||ch>'9')ch=getchar();
    while(ch>='0'&&ch<='9')x=x*10+ch-'0',ch=getchar(); 
    return x;
}
int n,m;
int v[200005],next[200005],first[20005],tot=1;
int dfn[20005],low[20005],cnt;
bool cut[20005]; 
int root,ans;
void add(int x,int y){
    v[++tot]=y;
    next[tot]=first[x];
    first[x]=tot;
}
void tarjan(int x){
    dfn[x]=low[x]= ++cnt;
    int sum=0;
    for(int i=first[x];i;i=next[i]){
        int y=v[i];
        if(!dfn[y]){
            tarjan(y);
            low[x]=min(low[x],low[y]);
            if(low[y]>=dfn[x]){
                sum++;
                if(x!=root || sum>1)cut[x]=true,ans++;
            }
        }
        else low[x]=min(low[x],dfn[y]);
    }
}
int main()
{
    memset(cut,false,sizeof(cut));
    cin>>n>>m;
    for(int i=1;i<=m;i++){
        int a=read(),b=read();
        add(a,b);add(b,a);
    }
    for(int i=1;i<=n;i++)
        if(!dfn[i])root=i,tarjan(i);
    ans=0;
    for(int i=1;i<=n;i++)
        if(cut[i])ans++;
    cout<<ans<<endl;
    for(int i=1;i<=n;i++)
    	if(cut[i])cout<<i<<' ';
    cout<<endl;
    return 0;
}
共 7 篇
  1. 个人记录

    班会课被jo了——ChatGPT的一个底层逻辑

    该文本主要介绍了概率论中的贝叶斯公式及其应用。首先定义了条件概率 P(A|B),并说明了事件独立性和完备事件组的概念。通过结合全概率公式,推导出贝叶斯定理的表达式: 以疾病检测为例,假设某地区巨头发病率0.0004,检测准确率为:患者阳性检出率99%、健康者阴性检出率99.9%。若某人检测呈阳性,则其真实患病的概率为约28.4%(即 P(A|B)=0.284)。进一步分析表明,复查可提升诊断准确性,而贝叶斯方法在ChatGPT等AI模型中也有潜在应用价值。

  2. 个人记录

    对拍

    两个输出文件分别为out1.out, out2.out

  3. 个人记录

    最快的快读

    显然我自己看不懂(大雾 注意只适用于正 int UPD 9.19.2020 送来一波适用于任意整数的快读:

  4. 题解

    题解 P3973 【[TJOI2015]线性代数】

    该文本描述了如何将矩阵运算问题转化为最小割模型的思路及实现方法。核心步骤如下: 问题转化 将矩阵表达式 D = (A × B - C) × A^T 展开后,发现每个 b_i,j 的贡献取决于 a_i 和 a_j 是否为1。若二者均为1则需扣除 c_i 和 c_j,否则直接损失 b_i,j。 网络流建模 节点设计:每个 b_i,j 对应一个节点,每个 c_i 也对应一个节点。 边连接: 源点向所有 b_i,j 节点连边,容量为 b_i,j; 所有 c_i 节点向汇点连边,容量为 c_i; 每个 b_i,j 节点向对应的 c_i 和 c_j 节点连容量为无穷大的边。 割的含义:最小割对应原问题中需舍弃的元素总和,通过切断源点到 b_i,j 的边或 c_i 到汇点的边实现。 算法实现 使用Dinic算法求解最大流(等价于最小割),最终答案为所有 b_i,j 的总和减去最大流值。代码中通过节点编号映射(b_i,j 节点编号为 (i-1)*n+j,c_i 节点编号为 n^2+i)完成建图,并处理约2e6条边的规模。 关键点:通过网络流模型将矩阵运算中的选择性损失转化为图的最小割问题,利用无穷边约束确保割的正确性,最终通过最大流计算得到最优解。

    10 赞
  5. 题解

    题解 CF961E 【Tufurama】

    写一篇分析较详细的树状数组题解 首先简化题意: 对于 [1,n] 中的每个数 i,告诉你 a_i 请求出有多少有序数对 (i,j) 满足: 对于这种多维题目,常见思路是根据单调性质维护几维,再用数据结构维护几维 所以我们可以把每个数先都插入树状数组,再通过扫描,利用单调性质及时排…

  6. 题解

    题解 CF600E 【Lomsat gelral】

    这是一道练启发式合并 (dsu on tree) 的好题 先简单说一下启发式合并吧 这道题我们可以遍历整棵树,并用一个数组ap(appear)记录每种颜色出现几次 但是每做完一棵子树就需要清空ap,以免对其兄弟造成影响。 而这样做它的祖先时就要把它重新搜一遍,浪费时间 但是我们发…

  7. 题解

    题解 P4802 【[CCO 2015]路短最】

    这是一道很好的练状态压缩的题 一看数据范围就知道时间复杂度是 2^n 级别的。 由于和路径长度有关,想到了经典的状压: dp[ i ][ j ] 表示状态为 i,现在在节点 j 的最长路径 具体解释(不熟悉状压的人): 设 i = 39 = 32 + 4 + 2 + 1 = 10…