跳到正文

Xse_Sepro

1026052

看什么看,我喜欢你

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

资料

编号
1026052
抓取

奖项

2025 CSP-S
一等奖
2024 CSP-S
一等奖

陶片放逐

+ 自由发言

查看记录

看什么看,我喜欢你

CP OAuth ProfileCP OAuth Profile

你知道吗,打乱顺序不影响人们阅读

别读了,再读一遍也是这样

网站

趋势大事祭

  • 2025.04.06 AC 5紫
  • 2025.04.10 AC 20蓝
  • 2025.04.12 AC 10紫
  • 2025.04.19 AC 25蓝
  • 2025.05.30 AC 20紫
  • 2025.07.16 AC 50蓝
  • 2025.07.22 AC 510次
  • 2025.07.24 AC 514次
  • 2025.08.04 AC 1黑
  • 2025.08.18 橙名力
  • 2025.09.19 打卡100天
  • 2025.09.26 AC 50紫
  • 2025.10.14 红名力
  • 2025.11.13 AC 猪国杀
  • 2026.04.01 棕名+tag 不愧是我
  • 2026.06.30 AC 100青
  • 2026.07.22 打卡365天

小事寄

  • 2025.08.16 AC 100橙
  • 2025.12.11 hjz 在机房对 ylf 说 你算老几
  • 2025.12.13 ABC场切六题
  • 2026.01.09 打卡200天
  • 2026.02.04 打卡222天
  • 2026.03.20 AC 100蓝
  • 2026.04.02 窝还有棕名
  • 2026.06.30 AC 6蓝
  • 2026.07.16 AC 100紫
  • 2026.07.23 打卡 366天
  • 2026.08.28 打卡 400天

2048

代码
51001 新生儿
51002 离人愁
51003 进监狱
51004 龙骑士
51005 通惠河
51006 刘伯温
51007 年终奖
51008 原子核
51009 将军令
51010 老傻子
51011 好基友
51012 跳一跳
51013 大屏幕
51014 男中音
51015 吾儿强
51016 网吧名
51017 火药味
51018 还嘴硬
51019 植物类
51020 踩油门
51021 网球场
51022 淋浴房
51023 仓库内
51024 零售业
51025 碳纳米
51026 六月份
51027 小面包
51028 水资源
51029 雷阵雨
51030 海洋王
51031 金戒指

510114514 士力架

老谷神帖

CyOI R1、LGR-238 作弊名单

CSP求助

洛谷搬这么多外国题有什么用(似了)





暂存

C++
#include<bits/stdc++.h>
#define int long long

constexpr int N=1e6;

int phi[N+5],not_prime[N+5];
int has_rt[N+5];
std::vector<int>primes;

void pre()
{
    phi[1]=1;
    for(int i=2;i<=N;++i)
    {
        if(!not_prime[i])
        {
            primes.push_back(i);
            phi[i]=i-1;
        }

        for(auto j:primes)
        {
            if(j*i>N)break;
            not_prime[i*j]=true;
            if(i%j==0)
            {
                phi[i*j]=phi[i]*j;
                break;
            }
            phi[i*j]=phi[i]*(j-1);
        }
    }

    has_rt[2]=has_rt[4]=true;
    for(int p:primes)
    {
        for(int num=p;num<=N;num*=p)has_rt[num]=true;
        for(int num=p*2;num<=N;num*=p)has_rt[num]=true;
    }
}

std::vector<int>get_prime_fac(int p)
{
    std::vector<int>ans;
    for(int i=2;i*i<=p;++i)
        if(p%i==0)
        {
            ans.push_back(i);
            while(p%i==0)p/=i;
        }
    
    if(p>1)ans.push_back(p);
    return ans;
}

int fast_pow(int a,int b,int p)
{
    int ans=1;
    for(;b;b>>=1,a=a*a%p)if(b&1)(ans*=a)%=p;
    return ans;
}

bool check(int x,int p,const std::vector<int> &fc)
{
    if(fast_pow(x,phi[p],p)!=1)return false;
    for(const auto i:fc)
        if(fast_pow(x,phi[i]/i,p)==1)return false;
    return true;
}

int find_rt(int p,const std::vector<int> &fc)
{
    for(int i=1;i<p;++i)if(check(i,p,fc))return i;
    return 0;
}

signed main()
{
    std::ios::sync_with_stdio(0);
    std::cin.tie(0),std::cout.tie(0);

    pre();

    int t;
    std::cin>>t;
    while(t--)
    {
        int n,d;
        std::cin>>n;
        if(!has_rt[n]){std::cout<<"0\n\n";continue;}

        std::vector<int>fcs(get_prime_fac(phi[n]));
        int min_rt=find_rt(p);
    }
}
代码
I often find myself lost in memories of the past.

Moments of life are frozen in my mind. I cut, fold, and curl the time behind me, kneading it into fluffy white clouds in the sky.

There are different types of clouds too: cumulus clouds are thick and heavy, while cirrus clouds are light and ethereal. The most striking scenes that flash through my mind stay with me forever, while more ordinary memories gradually fade under the wear of time. Reminiscing is like entering a dream—too clear and it spoils the fantasy, too vague and you fall into nothingness. Only the misty mountains and rivers, the veiled woman—that perfect touch of haze—can satisfy my pursuit of beauty.

Memory often wraps me in its yellowed pages when I least expect it. Friends who parted and reunited, streets torn down and rebuilt—these clues help me start from a specific moment and travel up the river of time. The past cannot be relived; I am merely a visitor. Yet I still long to take my time on each journey into memory, to pause before a scene, to gaze at my former self through the haze of years, and feel as much sweetness as possible. Beautiful moments once flowed through my body—that alone is enough to content me.

The past has solidified. I carry my memories forward, but I often neglect to preserve them properly, and the memories themselves keep changing shape. This brings certain challenges to my journeys of remembrance.

Where should I linger? I ask myself.
代码
我会用最直接、最真相、最不绕弯、最扎心、最硬核、最干脆、最不墨迹、最戳痛点、最不留情面、最一针见血、最开门见山、最单刀直入、最不铺垫、最不客套、最不煽情、最不废话、最不拐弯、最不磨叽、最不装、最不端着、最不啰嗦、最不拖沓、最不委婉、最不掩饰、最不藏着掖着、最直白、最露骨、最实在、最通透、最毒辣、最爽快、最解气、最上头、最够劲、最过瘾、最粗暴、最有效、最狠、最准、最稳、最绝、最顶、最炸、最刚、最烈、最飒、最莽、最冲、最猛、最脆、最亮、最透、最干、最净、最硬核的方式来告诉你,我没绷住
共 6 篇
  1. 个人记录

    【算法】斜率优化DP

    最水紫题 --Xse_Sepro 例题 用途 优化一些 O(n^2) DP。 思想 b=y-kx 将DP转移式看成一次函数,DP值看成一次函数的截距,在 y 值固定时,x>0,k 小 b 大,x<0,k 大 b 小。 实现 满足单调性,考虑单调队列优化DP,否则考虑二分。 实现时…

  2. 算法·理论

    一些模板

    快读快写--立于效率之巅 提供快速输入输出函数,通过位运算和循环优化读写效率,减少标准库函数调用开销。 gcd&lcm--千年的辗转 使用辗转相除法实现最大公约数(gcd),通过公式 x*y/gcd(x,y) 计算最小公倍数(lcm),算法简洁高效。 快速幂--跨越级别的优化 基于二进制分解的快速幂算法,通过模运算实现高效幂运算,适用于大指数下的计算优化。 加法预处理组合数--用加法替代乘法 利用递推公式预处理组合数,通过动态规划和模运算避免直接乘法,提升计算效率。 Prüfer序列--绚丽的“树列” 实现树与Prüfer序列的转换,用于生成树计数或树结构分析,核心是通过度数和LCA操作构建序列。 并查集--专精并与查 并查集(DSU)结构,支持路径压缩和按秩合并,高效处理集合的合并与查询操作。 线性求逆元--模之下的乘换除 通过递推公式线性计算模逆元,利用欧拉定理和筛法优化,适用于模运算中的除法替代。 马拉车(Manacher)--至简回环 马拉车算法用于寻找最长回文子串,通过预处理字符串和对称性优化,实现线性时间复杂度。 矩阵乘法--用数字代替递推 定义矩阵结构并实现矩阵乘法运算,结合模运算处理区间操作,适用于动态规划或线性代数场景。 dfs序求lca--O(1) LCA 通过DFS序和倍增法预处理,实现LCA查询的O(1)复杂度,但代码存在变量名错误(如“mian”应为“main”)。 虚树--O(1) LCA 构建虚树以优化树结构问题,通过处理关键节点和LCA关系,减少实际节点数量,但代码片段不完整。 Tarjan缩点--强连通分量处理 使用Tarjan算法进行强连通分量(SCC)缩点,将图转化为DAG,但代码中变量名可能存在拼写错误。 线段树--区间操作的BUG 线段树结构用于区间查询和更新,但私有函数(如add、push_up)未实现,需补充完整以避免运行错误。 线性求phi--欧拉函数计算 通过筛法线性计算欧拉函数(phi),利用数论性质优化预处理过程,适用于快速求解模运算相关问题。 NTT--精度问题的替代方案 数论变换(NTT)实现多项式乘法,避免浮点精度问题,适用于模运算下的卷积计算,但代码存在未完成部分。

    1 赞
  3. 学习·文化课

    T628847 Xse 和 JJL 玩游戏

    该文本展示了洛谷题目 T628847 的 C++ 解法。核心思路是将区间对转化为矩形覆盖问题,采用扫描线算法结合带懒标记的线段树求解最大覆盖值。代码通过构建并排序左右边界事件,在遍历中动态更新线段树区间,实时维护并输出全局最大值。

  4. 题解

    P10155

    本文是洛谷 P10155 的题解总结。核心结论为:若数组末尾元素不为 n 则无解;否则需从后向前遍历,统计当前元素大于右侧已遍历部分最小值的次数。文章澄清了该问题与二分及插入排序无关,并提供了完整的 C++ 代码实现。

    1 赞
  5. 题解

    Big String超级字符串

    本文简要介绍了BZOJ 3171题的解法。因直接模拟会导致内存溢出(MLE),作者放弃了该方案,转而利用类斐波那契数列的规律定位n的位置,从而确定最终字符。

    1 赞