跳到正文

BFs_YYDS

919802

吾日三省吾身。双向建边了吗?DFS递归死循环了吗?LCA 跳过头了吗?蒟蒻一名~(原用户名sxt2204)

资料、奖项与版本

资料

编号
919802
抓取

陶片放逐

+ 发送私信
− 发送私信
无权限变更

查看记录

3942892791

加我qq(我是被迫写上qq号的)

点击进入我的用户名演变史\color{black}{点击进入我的用户名演变史}

2024-8-5 绿名

2025-2-10 退化蓝名

2025-7-22 再次绿名

2025-9-22 终于橙名了啊啊啊啊

2025-10-14 怎么又绿了啊啊啊啊啊

2025-11-3 再次橙名

2025-11-18 就要一直在橙和绿之间徘徊吗?

2025-11-24 再次橙名

2026-2-2 再次绿名

2026-3-18 再次橙名

2026-3-30 艹,又双叒叕绿名了

2026-4-6 想干啥?又橙名了

2026-4-13 woc!红名!!!!!!!!!!!!!!!!!

2026-4-16 绿勾!

2026-8-17 好久没打比赛,掉橙了

2026-8-23 达成成就:被棕力!

代码
▒▒▒█████████████▒▒▒
▒▒███████████████▒▒
▒████████████████▒▒
▒███████▒████▒████▒
▒████▒██▒▒██▒▒▒███▒
████▒▒▒▒▒▒▒▒▒▒▒███▒
██▒█▒▒▒█▒▒▒▒█▒▒████
██▒▒▒▒▒█▒▒▒▒█▒▒████
███▒▓▓▒▒▒▒▒▒▒▒▓▓███
████▓▓▒▒█▒▒█▒▒▓▓▒██
██████▒▒▒██▒▒▒▒████
███████▒▒▒▒▒▒▒█████
▒█▒█████▒▒██████▒█▒
▒▒▒█▒▒▒█▒▒█▒▒▒▒▒▒▒▒
▒▒▒▒▒███████▒▒▒▒▒▒▒
▒▒▒██▓█████▓███▒▒▒▒
▒▒█▓█▒▒▒▒▒▒▒▒███▒▒▒
▒█▓██▓▓▓▓▓▓▓▓▓█▓█▒▒
▒█▓█▓▓▓▓▓▓▓▓▓▓█▓█▒▒
▒███▒▒▒▒▒▒▒▒▒▒███▒▒
▒█▒█▓▓▓▓▓▓▓▓▓▓█▒█▒▒
▒███▓▓▓▓▓▓▓▓▓▓███▒▒
▒▒▒█▓▓▓▓███▓▓▓█▒▒▒▒
▒▒▒█▓▓▓▓█▒█▓▓▓█▒▒▒▒
▒▒▒██████▒█████▒▒▒▒
▒▒▒▒▒████▒████▒▒▒▒▒
▒▒▒▒█████▒█████▒▒▒▒
C++
//C
#ifndef _GLIBCXX_NO_ASSERT
#include <cassert>
#endif
#include <cctype>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <csetjmp>
#include <cstdarg>
#include <cstddef>
#include <cstdlib>

#if __cplusplus >= 201103L
#include <cstdint>
#endif

// C++
#include <bitset>
#include <complex>
#include <algorithm>
#include <bitset>
#include <functional>
#include <iterator>
#include <limits>
#include <memory>
#include <new>
#include <numeric>
#include <typeinfo>
#include <utility>

#if __cplusplus >= 201103L
#include <array>
#include <atomic>
#include <initializer_list>
#include <ratio>
#include <scoped_allocator>
#include <tuple>
#include <typeindex>
#include <type_traits>
#endif

#if __cplusplus >= 201402L
#endif

#if __cplusplus >= 201703L
#include <any>
#include <execution>
#include <optional>
#include <variant>
#include <string_view>
#endif

#if __cplusplus >= 202002L
#include <bit>
#include <compare>
#include <concepts>
#include <numbers>
#include <ranges>
#include <span>
#include <source_location>
#include <version>
#endif

#if __cplusplus > 202002L
#include <expected>
#include <stdatomic.h>
#if __cpp_impl_coroutine
# include <coroutine>
#endif
#endif

#if _GLIBCXX_HOSTED
// C
#ifndef _GLIBCXX_NO_ASSERT
#include <cassert>
#endif
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <cwchar>
#include <cwctype>

#if __cplusplus >= 201103L
#include <ccomplex>
#include <cfenv>
#include <cinttypes>
#include <cstdalign>
#include <cstdbool>
#include <cstdint>
#include <ctgmath>
#include <cuchar>
#endif

// C++
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>

#if __cplusplus >= 201103L
#include <array>
#include <atomic>
#include <chrono>
#include <codecvt>
#include <condition_variable>
#include <forward_list>
#include <future>
#include <initializer_list>
#include <mutex>
#include <random>
#include <ratio>
#include <regex>
#include <scoped_allocator>
#include <system_error>
#include <thread>
#include <tuple>
#include <typeindex>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
#endif

#if __cplusplus >= 201402L
#include <shared_mutex>
#endif

#if __cplusplus >= 201703L
#include <any>
#include <charconv>
#include <execution>
#include <filesystem>
#include <optional>
#include <memory_resource>
#include <variant>
#endif

#if __cplusplus >= 202002L
#include <barrier>
#include <bit>
#include <compare>
#include <concepts>
#include <format>
#include <latch>
#include <numbers>
#include <ranges>
#include <span>
#include <stop_token>
#include <semaphore>
#include <source_location>
#include <syncstream>
#include <version>
#endif

#if __cplusplus > 202002L
#include <expected>
#include <spanstream>
#if __has_include(<stacktrace>)
# include <stacktrace>
#endif
#include <stdatomic.h>
#include <stdfloat>
#endif

#endif // HOSTED

//stl
#include<iterator>
#include<functional>
#include<vector>
#include<deque>
#include<list>
#include<queue>
#include<stack>
#include<set>
#include<map>
#include<algorithm>
#include<numeric>
#include<memory>
#include<utility>
namespace rwm{
    inline int read() {
        int s = 0, w = 0;
        char c = getchar();
        while (!isdigit(c)) {
            w |= (c == '-');
            c = getchar();
        }
        while (isdigit(c)) {
            s = (s << 1) + (s << 3) + (c ^ 48);
            c = getchar();
        }
            return w ? -s : s;
    }

    inline void write(int x) {
        if (x < 0) putchar('-'), x = -x;
        if (x > 9) write(x / 10);
        putchar(x % 10 | 48);
    }

    inline void writesp(int x) {
        write(x), putchar(' ');
    }

    inline void writeln(int x) {
        write(x), putchar('\n');
    }

    inline int square(int x) {
        return x * x;
    }

    inline int dfloor(double x) {
        return x;
    }

    inline int dceil(double x) {
        return (int) (x + 0.5);
    }

    inline int gcd(int x, int y) {
        int z = x % y;
        while (z) x = y, y = z, z = x % y;
        return y;
    }

    inline int lcm(int x, int y) {
        return x / gcd(x, y) * y;
    }
}
#define lint long long int
#define ldouble long double
#define elif else if
#define fin(x) freopen (x,"r",stdin)
#define fout(x) freopen (x,"w",stdout)
#define rnt register int
#define loop(i, x, y) for (rnt i=(x);i<(y);++i)
#define rloop(i, x, y) for (rnt i=(y);i>(x);--i)
#define inf LLONG_MAX
#define infl LLONG_MIN
#define nit int
#define nti int
#define itn int
#define tin int
#define tni int
#define logn long
#define lgno long
#define lgon long
#define lnog long
#define lngo long
#define ln putchar('\n')
#define sp putchar(' ')
using namespace std;

没想到吧,这里还有\color{white}没想到吧,这里还有

共 9 篇
  1. 闲话

    我服了啊

    用户质疑洛谷题解提交入口满后直接封禁的机制,认为应通过审核机制替换较差题解而非一刀切封堵。他不满平台未对已提交题解进行质量筛选,导致优质内容被拒之门外,同时对管理员的处理方式表示不解。最后表示即使被封号也会通过换账号等方式继续发布题解,暗示对现有规则的不认可。

  2. 题解

    P17016 [GESP202606 八级] 线网建设 题解

    该题解将基站问题建模为图论问题,通过以下步骤解决: 将每个基站视为图节点,计算相邻节点间距离若小于等于给定阈值l则建立边 使用并查集判断所有节点是否连通,若不连通则输出"Impossible" 若图连通,则采用Kruskal算法求解最小生成树,总边权和即为答案 通过排序所有符合条件的边并逐步合并,最终输出保留两位小数的总权值

  3. 科技·工程

    Brainf[数据删除]k语言的一个轻量级IDE(终端)

    这是一个基于 C++ 和 Windows 控制台实现的 Brainfuck 语言集成开发环境(IDE)与调试器。其主要功能和特点如下: 代码编辑器:支持文本输入、方向键光标移动、删除与换行操作。具备语法高亮功能(指令绿色、光标黄色、未匹配括号红色),并支持自动换行、文件保存(F3)与加载(F4)。 程序解释器:完整实现 Brainfuck 指令集(如 + - < > [ ] . ,),包含内存管理、指针越界检查及括号匹配验证。 交互式调试器:通过 F6 启动,支持单步执行(n)、继续运行(c)、设置断点(b)、查看内存转储(m)、指针位置(p)及代码列表(l)。 设置系统:提供图形化菜单(F2),允许用户配置内存大小、单元初值、警告开关、显示模式及编辑器自动换行参数。 界面实现:利用 Windows API (conio.h, windows.h) 实现控制台颜色属性与键盘输入处理,提供友好的命令行交互体验。

  4. 闲话

    疯了。。。

    该C++代码实现了一个模拟车辆行驶并计算加油费用的程序。其核心逻辑如下: 输入参数:读取速度(s)、油耗(c)、油箱容量(l)、初始油量(p0)和加油站数量(n)。 数据存储:创建一个包含n+1个加油站信息的向量a,每个元素存储距离和对应油价。 排序处理:按距离升序排列加油站,若距离相同则按油价升序排列。 费用计算:遍历加油站,计算每段路程所需油量。若当前油量不足,则通过补充油量(基于油价和油箱容量)来满足需求,并累加总费用。 输出结果:最终输出总加油费用。 注:代码中变量名冗长且存在冗余描述,实际开发中建议使用简洁命名(如d、cost等)以提升可读性。

  5. 算法·理论

    一种全新的判断质数的方法(吗?)

    作者在数学课上猜想:除 2 和 5 外的质数倒数均为纯循环小数。为此让 AI 编写 C++ 程序验证,测试中发现非质数 1729 的倒数也满足条件,令作者质疑原猜想,并自嘲于不断推翻自己的思考过程。

  6. 题解

    题解:P15805 [GESP202603 八级] 子图最短路

    本题要求计算所有可能的点区间子图中点对最短距离之和。对于每个区间[ℓ, r],需构造包含编号在该区间内的子图,并统计其中所有点对的最短路径。若两点不连通则距离为0,结果需对1e9取模。数据范围n≤100。 解法思路: 采用优化的增量Floyd算法,将复杂度从暴力的O(N⁵)降至O(N⁴)。固定左端点ℓ,逐个扩展右端点r,每次新增节点r时,仅以r为中继点更新当前子图中所有点对的最短距离(通过tmp数组保存当前状态)。最终遍历所有区间[l, r],累加其点对最短距离之和。 关键注意事项: 最短路计算过程中不可提前取模,需保留真实值,仅在最终结果累加时取模; 初始化距离矩阵为mod(1e9),若最终距离仍为mod则说明不连通; 使用long long类型避免溢出,因单条最短路最大可能达到1e8; 模数为1e9而非1e9+7。

  7. 休闲·娱乐

    洛谷革命爆发

    前言: 这里提到的所有人都会 hatg(f)=int_-∞^∞g(t)· e^-2π iftdt (数学) 看不懂?再来几个: f(x) = int_-∞^∞ hat f(x)xi,e^2 π i xi x ,dxi $\begin{array}{l} a\mathop{{x}}…

  8. 休闲·娱乐

    好玩的(和OI息息相关)

    语文老师一回头,此地空杀黄鹤楼。 数学老师一回头,二次函数对称轴。 英语老师一回头,sorry加上三克油。 化学老师一回头,二氧化碳变汽油。 物理老师一回头,阿基米德要跳楼。 生物老师一回头,试管婴儿水里游。 体育老师一回头,乔丹改打乒乓球。 政治老师一回头,全班同学都梦游。 历…