跳到正文

Liuhy2996

676520

流萤厨 || 及时行乐 || TOPTREES -领先®

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

资料

编号
676520
抓取

版本

  1. v2当前
  2. v1
『我曾安眠,赤染之茧』\text{\textcolor{#000000}{『我曾安眠,赤染之茧』}} 『自破碎的天空坠落』\text{\textcolor{#000000}{『自破碎的天空坠落』}} 『沉睡在静默的星河』\text{\textcolor{#000000}{『沉睡在静默的星河』}} 『我会看见,飞萤之火』\text{\textcolor{#000000}{『我会看见,飞萤之火』}} 『自无梦的长夜亮起』\text{\textcolor{#000000}{『自无梦的长夜亮起』}} 『绽放在终竟的明天』\text{\textcolor{#000000}{『绽放在终竟的明天』}}

警钟敲烂!!!没实力不要乱开 T3!!!

这是一个流萤\footnotesize {\color{black}流萤}厨、一个刘慈欣\footnotesize {\color{black}刘慈欣}忠粉。

LaTeX  \space 神(歌单)  \space 我收集的  \space Ad-hoc&Tricks
流萤  \space 刘慈欣
北海  \space 林云  \space 凯文  \space 厄  \space 丝  \space 爱莉  \space 涟  \space 芙  \space 妲  \space

原:297122315
铁:154804233

洛谷

2024/10/09 1k通过祭
2025/08/01 紫黑100祭
2025/08/21 打卡400天祭
2025/09/25 蓝紫黑300祭
2025/10/22 蓝200,蓝紫黑350祭
2025/11/17 蓝紫黑400祭
2025/11/21 1.5k通过,10黑祭
2025/11/22 等级分2000祭
2025/11/29 打卡500天祭
2025/12/19 紫黑200祭
2025/12/29 紫200,蓝紫黑450祭
2025/12/31 黑20祭
2026/01/10 蓝紫黑500祭
2026/02/27 紫黑300祭
2026/05/14 黑50祭
2026/10/07 黑60祭
洛谷用户卡片

Atcoder

2024/08/10 青
2024/12/28 蓝

Codeforces

2025/08/28 蓝

代码框架
C++
#include<bits/stdc++.h>
using namespace std;
#define int long long
#define psb push_back
#define f(i,l,r) for(int i=l,R##R=r;i<=R##R;++i)
#define g(i,l,r) for(int i=l,R##R=r;i>=R##R;--i)
const int N=2e6+10;

void mian(){
	
}
signed main(){
//	freopen(".in","r",stdin);
//	freopen(".out","w",stdout);
	ios::sync_with_stdio(0); cin.tie(0),cout.tie(0);
	int T=1; f(i,1,T) mian();
	return 0;
}
WARNING

『There’s a long night coming soon,I’d shine as the last shine』\text{『There's a long night coming soon,I'd shine as the last shine』}
『很快长夜将至,我愿化作最后的光芒』\text{『很快长夜将至,我愿化作最后的光芒』}
——《Nightglow》\text{——《Nightglow》}

『Deeply engraved, my memory is silent but not forgotten indeed』\text{『Deeply engraved, my memory is silent but not forgotten indeed』}
『脑海深处的记忆 沉默着却从未被遗忘』\text{『脑海深处的记忆 沉默着却从未被遗忘』}
『someone has gone but a voice within me』\text{『someone has gone but a voice within me』}
『有人已离开 声音却在脑海中回响』\text{『有人已离开 声音却在脑海中回响』}
——《Starfall》\text{——《Starfall》}

『Turned into a moon that always tells the warmth and brightness of the sun』\text{『Turned into a moon that always tells the warmth and brightness of the sun』}
『化为月亮长久地传达着太阳的光耀』\text{『化为月亮长久地传达着太阳的光耀』}
——《Moon Halo》\text{——《Moon Halo》}

Da capo


When good old friends are going away\text{\textcolor{#4A86E8}{When good old friends are going away}}
Will you wish them to remember your name?\text{\textcolor{#4A86E8}{Will you wish them to remember your name?}}
When good old days are passing away\text{\textcolor{#4A86E8}{When good old days are passing away}}
Will you promise your heart remains the same\text{\textcolor{#4A86E8}{Will you promise your heart remains the same}}

Never can we suspend the time\text{\textcolor{#FFD700}{Never can we suspend the time}}
Having to leave the tracks behind\text{\textcolor{#FFD700}{Having to leave the tracks behind}}
there is a longer way ahead, After all.\text{\textcolor{#FFD700}{there is a longer way ahead, After all.}}

There used to be a story teller\text{\textcolor{#B464FF}{There used to be a story teller}}
who always painted the sunshine and the rain\text{\textcolor{#B464FF}{who always painted the sunshine and the rain}}
One has to eventually grow up\text{\textcolor{#B464FF}{One has to eventually grow up}}
Spending a lifetime to taste the love and pain\text{\textcolor{#B464FF}{Spending a lifetime to taste the love and pain}}

Never can we suspend the time\text{\textcolor{#FFD700}{Never can we suspend the time}}
Having to leave the tracks behind\text{\textcolor{#FFD700}{Having to leave the tracks behind}}
there is a longer way ahead, After all.\text{\textcolor{#FFD700}{there is a longer way ahead, After all.}}

If it’s too hard to say goodbye\text{\textcolor{#FFA500}{If it's too hard to say goodbye}}
Give us a try to sing a rhyme\text{\textcolor{#FFA500}{Give us a try to sing a rhyme}}
"May you, the beauty of this world, always shine."\text{\textcolor{#FFA500}{"May you, the beauty of this world, always shine."}}

Moon Halo


Some deserts on this planet were oceans once\text{\textcolor{#4DA6FF}{Some deserts on this planet were oceans once}}
Somewhere shrouded by the night, the sun will shine\text{\textcolor{#4DA6FF}{Somewhere shrouded by the night, the sun will shine}}
Sometimes I see a dying bird fall to the ground\text{\textcolor{#4DA6FF}{Sometimes I see a dying bird fall to the ground}}
But it used to fly so high\text{\textcolor{#4DA6FF}{But it used to fly so high}}

I thought I were no more than a bystander till I felt a touch so real\text{\textcolor{#4DA6FF}{I thought I were no more than a bystander till I felt a touch so real}}
I will no longer be a transient when I see smiles with tears\text{\textcolor{#4DA6FF}{I will no longer be a transient when I see smiles with tears}}
If I have never known the sore of farewell and pain of sacrifices\text{\textcolor{#4DA6FF}{If I have never known the sore of farewell and pain of sacrifices}}
What else should I engrave on my mind\text{\textcolor{#4DA6FF}{What else should I engrave on my mind}}

Frozen into icy rocks, that’s how it starts\text{\textcolor{#B98CFF}{Frozen into icy rocks, that's how it starts}}
Crumbled like the sands of time, that’s how it ends\text{\textcolor{#B98CFF}{Crumbled like the sands of time, that's how it ends}}
Every page of tragedy is thrown away burned out in the flame\text{\textcolor{#B98CFF}{Every page of tragedy is thrown away burned out in the flame}}

A shoulder for the past\text{\textcolor{#B98CFF}{A shoulder for the past}}
Let out the cries imprisoned for so long\text{\textcolor{#B98CFF}{Let out the cries imprisoned for so long}}
A pair of wings for me at this moment\text{\textcolor{#B98CFF}{A pair of wings for me at this moment}}
To soar above this world\text{\textcolor{#B98CFF}{To soar above this world}} Turn into a shooting star that briefly shines but warms up every heart\text{\textcolor{#B98CFF}{Turn into a shooting star that briefly shines but warms up every heart}}

May all the beauty be blessed\text{\textcolor{#B98CFF}{May all the beauty be blessed}}
May all the beauty be blessed\text{\textcolor{#B98CFF}{May all the beauty be blessed}}

I will never go\text{\textcolor{#FFA500}{I will never go}}
There’s a way back home\text{\textcolor{#FFA500}{There's a way back home}}
Brighter than tomorrow and yesterday\text{\textcolor{#FFA500}{Brighter than tomorrow and yesterday}}
May all the beauty be blessed\text{\textcolor{#FFA500}{May all the beauty be blessed}}

Wave good-bye to the past when hope and faith have grown so strong and sound\text{\textcolor{#FFA500}{Wave good-bye to the past when hope and faith have grown so strong and sound}}
Unfold this pair of wings for me again\text{\textcolor{#FFA500}{Unfold this pair of wings for me again}}
To soar above this world\text{\textcolor{#FFA500}{To soar above this world}}
Turned into a moon that always tells the warmth and brightness of the sun\text{\textcolor{#FFA500}{Turned into a moon that always tells the warmth and brightness of the sun}}

May all the beauty be blessed\text{\textcolor{#FFA500}{May all the beauty be blessed}}
May all the beauty be blessed\text{\textcolor{#FFA500}{May all the beauty be blessed}}

不及


落叶散落在无人的街角\text{\textcolor{#000000}{落叶散落在无人的街角}}
花开花落逃不过时间的步调\text{\textcolor{#000000}{花开花落逃不过时间的步调}}
星光埋藏在乌云中不知所踪\text{\textcolor{#000000}{星光埋藏在乌云中不知所踪}}
这些我都懂 命运捉弄\text{\textcolor{#000000}{这些我都懂 命运捉弄}}

体会一切的发生悲伤或感动\text{\textcolor{#000000}{体会一切的发生悲伤或感动}}
以为生命就是翻越喜悲平静着接受\text{\textcolor{#000000}{以为生命就是翻越喜悲平静着接受}}

可是已来不及\text{\textcolor{#000000}{可是已来不及}}
这告别措手不及\text{\textcolor{#000000}{这告别措手不及}}
太多不甘心\text{\textcolor{#000000}{太多不甘心}}
质问命运为何如此偏心\text{\textcolor{#000000}{质问命运为何如此偏心}}
越逃离 回忆却越发清晰\text{\textcolor{#000000}{越逃离 回忆却越发清晰}}
记得起 那些\text{\textcolor{#000000}{记得起 那些}}
不经意\text{\textcolor{#000000}{不经意}}
孤独徘徊的记忆\text{\textcolor{#000000}{孤独徘徊的记忆}}
两颗心 剥离\text{\textcolor{#000000}{两颗心 剥离}}

长大后忘记儿时的布偶\text{\textcolor{#000000}{长大后忘记儿时的布偶}}
那些手写的书信 字迹都斑驳\text{\textcolor{#000000}{那些手写的书信 字迹都斑驳}}
有些伤口到最后疤痕都没留\text{\textcolor{#000000}{有些伤口到最后疤痕都没留}}
那时我不懂 有何不同\text{\textcolor{#000000}{那时我不懂 有何不同}}

体会一切的发生短暂或长久\text{\textcolor{#000000}{体会一切的发生短暂或长久}}
如果时间真能带走一切 这次呢\text{\textcolor{#000000}{如果时间真能带走一切 这次呢}}

可是已来不及\text{\textcolor{#000000}{可是已来不及}}
这离别措手不及\text{\textcolor{#000000}{这离别措手不及}}
我无法抗拒\text{\textcolor{#000000}{我无法抗拒}}
去相信或是忘记触手不及\text{\textcolor{#000000}{去相信或是忘记触手不及}}
不任性 第一次承认宿命\text{\textcolor{#000000}{不任性 第一次承认宿命}}
记得起 那些\text{\textcolor{#000000}{记得起 那些}}
夜深人静\text{\textcolor{#000000}{夜深人静}}
孤独徘徊的记忆\text{\textcolor{#000000}{孤独徘徊的记忆}}
两颗心 分离\text{\textcolor{#000000}{两颗心 分离}}

索取 轮转回心\text{\textcolor{#000000}{索取 轮转回心}}
抽离\text{\textcolor{#000000}{抽离}}
越长大越 没机会 忘记\text{\textcolor{#000000}{越长大越 没机会 忘记}}

因为已来不及\text{\textcolor{#000000}{因为已来不及}}
这一切措手不及\text{\textcolor{#000000}{这一切措手不及}}
我无法抗拒\text{\textcolor{#000000}{我无法抗拒}}
去相信或是忘记触手不及\text{\textcolor{#000000}{去相信或是忘记触手不及}}
不任性 第一次承认宿命\text{\textcolor{#000000}{不任性 第一次承认宿命}}
记得起 那些\text{\textcolor{#000000}{记得起 那些}}
轻声细语\text{\textcolor{#000000}{轻声细语}}
越发清晰的回忆\text{\textcolor{#000000}{越发清晰的回忆}}
我们曾 相依\text{\textcolor{#000000}{我们曾 相依}}

共 10 篇
  1. 生活·游记

    CSP-S 2026游记

    Day1:首先处理T1和T2,随后分析T3的路径差异,发现可通过枚举i和j点并计算nx_i和pr_i的最远可达点来优化解法。在剩余时间里,尝试将连通块限制在直径上,利用二分法和双指针技术解决区间覆盖问题。Day2:T4解法失败,仅获得40分。

    1 赞
  2. 题解

    题解:CF542B Duck Hunt

    该文本描述了一种通过动态规划结合线段树优化的算法,用于解决在时间区间内安排枪击以最小化漏掉鸭子的问题。核心思路是:定义dp_i表示在时刻i开枪时的最小漏鸭数,利用线段树维护区间最小值,通过分治策略处理不同时间段。算法将问题转化为对时间区间的分段处理,每段内相邻枪击间隔不小于m,并采用四叉线段树结构优化空间复杂度。最终通过分治计算和线段树的区间更新与查询操作,实现O(n log^2 V)的时间复杂度,其中V为时间范围。代码中通过排序、分治递归和线段树操作完成计算,最后输出结果。

  3. 生活·游记

    APIO 2026

    凹了 5 天真境巨史,然后还没过。你妈的。 Day 1 哇,T1 计数。想了一会没思路,看 T2,会 56,先写了。然后 T3 不像是能做的。于是开始死磕 T1,考虑容斥,推了一坨柿子之后得到 f(S) 是钦定 S 上升的方案数。然后发现包含固定点的上升段很难搞,糊了个不知道几次…

  4. 生活·游记

    GDOI2026游记

    这是一段编程竞赛的参赛日记,记录了选手在比赛期间的经历与感受。Day 0因键盘故障要求更换,参加聚会后失眠;Day 1比赛中T1用期望DP解决但耗时较多,T2仅完成简单DP部分,T3因复杂分讨仅得部分分数,最终总分270;Day 2T1因过度思考未用关键技巧,T2完全无思路,T3部分得分但误判题意导致放弃;Day 3休息恢复;Day 7反思比赛结果,提及D1T2的讨论。整体呈现选手在竞赛中遇到的困难、解题过程及对成绩的自嘲。

    9 赞
  5. 个人记录

    记录

    详细题解 AT_cf17_final_j 解题报告 题意分析 题目大意 给定一颗 n 个点的树,有点权 x_u 和边权 c_u。用这棵树生成一个 n 个点的完全无向图,u 和 v 之间的边权为 dis(u,v)+x_u+x_v,要求这个图的最小生成树。 数据范围 n ≤ 2 × …

  6. 个人记录

    DP 状态设计专题 题解

    该文本总结了多道编程竞赛题的解题思路,主要涉及动态规划(DP)与容斥原理的结合应用。核心方法包括: 容斥法:通过将反向限制转化为同向限制(如将“>”容斥为“<”),将问题简化为多个同向限制的子问题,利用DP计算方案数,需注意容斥系数的处理。 直接DP状态设计: 对于需划分块的题目(如P5999、CF704B、P2612),定义状态dp_i,j表示前i个元素划分为j个块的方案数,通过三种转移方式(新建块、并到相邻块、合并块)处理不同情况。 需特别处理边界条件,如s和t的特殊贡献,或区分块的左右合并方式。 特殊问题转化: P2467通过观察对称性,将问题转化为计算满足p_1 < p_2的排列数并乘以2。 P3214将重复片段问题转化为异或和为0的序列问题,利用DP处理长度为m的合法序列,需排除非法情况(如异或结果为0或重复)。 优化技巧:多数DP转移需结合前缀和优化以降低复杂度,且需注意状态维度的压缩(如P4728中合并序列结尾与最小值的状态)。 整体思路强调通过状态设计和数学转化(如容斥、异或)简化复杂限制,结合DP递推求解,并关注边界条件与特殊元素的处理。

  7. 生活·游记

    NOIP 2025 游记

    Day -? NOIP2024 因为 T4 一眼会了 64pts,而 T2 一眼没思路于是去写了 2h T4,T2 白丢 80pts。获得天赋:稳扎稳打。 Day -1 神金体测把我从 GZ 拉回 SZ。 Day 0 依旧考前不颓何时颓。 下午翘掉训练跟同学打了 2h 球,晚上爽…

  8. 生活·游记

    CSP游记

    总结 该文本记录了某次编程竞赛的备考与考试经历。Day-12提到对SCP-J题目的困惑;Day0中完成凹幽境题目但耗时较长。Day1考试中,J组前四题耗时30分钟,后续未完成;S组T1用贪心算法解决,T2因未使用归并优化导致复杂度较高,最终通过分讨n+1选不选的策略结合MST和DFS完成;T3代码从O(qn)优化至O(L₂ log n),但大样例运行时间较长;T4尝试状压DP仅获得20分。Day2考后反思发现T2复杂度未达标,T3正解可能未通过,最终J组得分0-400,S组0-250,因未通过部分题目而懊悔。整体体现备考过程中的算法挑战、时间压力及代码调试问题。

    8 赞
  9. 题解

    题解:AT_abc388_c [ABC388C] Various Kagamimochi

    该代码通过枚举每个麻糬并利用二分查找统计其可放置的麻糬数量,最终累加得到总和。具体思路是:对数组a中的每个元素a[i],在已排序的数组中查找前i个元素中不大于a[i]/2的元素个数,使用upper_bound函数实现二分查找,从而高效统计满足条件的配对数量。

  10. 生活·游记

    WC2026游记

    Day [-6,-3] 去杭州补数学,发现 @dhlyjsp 也在 hz(虽然他学的 PHO),且我们酒店相距仅 13km、20min 车程。 强烈谴责 @dhlyjsp Day[-6,-5] 都不用上课但是不来找我玩。寒假等着被我肘飞 MO 还是太难了,稍微卡住一点就不知道老师…