摘要: AT_abc400_d [ABC400D] Takahashi the Wall Breaker 一次踢两步也转移一下,直接搜 E - Ringo's Favorite Numbers 3 阅读全文
posted @ 2025-10-05 10:34 arin876 阅读(2) 评论(0) 推荐(0)
摘要: C. Digital Logarithm 赛时想到了归并排序,用两个vector做的,想到了之前的用b匹配a,逐个匹配 更好的是题解的优先队列 #include<bits/stdc++.h> using namespace std; #define endl '\n' #define yes cou 阅读全文
posted @ 2025-10-01 00:19 arin876 阅读(6) 评论(0) 推荐(0)
摘要: 总体训练流程****** 1. 训练模式启动 训练器初始化:配置模型、数据集、超参数(批量大小32、学习率1e-4、训练轮数100) 启用Dropout和BatchNorm 开启梯度计算和异常检测 2. 批次训练迭代 逐批次加载训练数据到GPU 前向传播计算模型输出和损失 反向传播计算梯度 梯度裁剪 阅读全文
posted @ 2025-09-25 10:16 arin876 阅读(11) 评论(0) 推荐(0)
摘要: D - Long Waiting 三个优先队列 #include<bits/stdc++.h> using namespace std; #define endl '\n' #define yes cout << "YES" << endl #define no cout << "NO" << en 阅读全文
posted @ 2025-09-17 23:22 arin876 阅读(10) 评论(0) 推荐(0)
摘要: K .Maximum GCD 首先想到a[1],其他%后成为a[1],但是【一个数取模后可能得到的数为[0,\(\lceil\frac{x}{2}\rceil\)-1]】不一定能得到a[1] 否则的话,构造a[1]偶数,a[1]不动,其他必然能够取模得到a[1]/2,否则要是a[1]/2>(x+1) 阅读全文
posted @ 2025-09-02 16:09 arin876 阅读(11) 评论(0) 推荐(0)
摘要: E - 无线软件日 (J) 极简合数序列 (A) 无线网络整点栅格统计 正方形中心(cx,cy)=((a+c)/2,(b+d)/2) 对角线向量(dx,dy)=((c-a)/2,(d-b)/2) 逆时针旋转90度,(-dy,+dx)顺时针(+dy,-dx) (x1,y1)=(cx-dy,cy+dx) 阅读全文
posted @ 2025-08-31 12:02 arin876 阅读(10) 评论(0) 推荐(0)
摘要: L.龙之研习 积累多闰年 #include<bits/stdc++.h> using namespace std; #define int long long int k; bool check(__int128 x){ __int128 s=0; for(__int128 i=4;i<=x;i*= 阅读全文
posted @ 2025-08-29 18:44 arin876 阅读(14) 评论(0) 推荐(0)
摘要: I. Essentially Different Suffixes 字符串hash或者tire树 #include<bits/stdc++.h> using namespace std; int tr[300010][30];int cnt[300010]; int idx=0;int ans=0; 阅读全文
posted @ 2025-08-26 20:54 arin876 阅读(24) 评论(0) 推荐(0)
摘要: D.Two Divisors #include<bits/stdc++.h> using namespace std; const int N=500010; int n; int a[N]; int b[N];int c[N]; const int V=10000010; int lp[V];in 阅读全文
posted @ 2025-08-25 00:48 arin876 阅读(6) 评论(0) 推荐(0)
摘要: D.Lucky Chains gcd=差分gcd gcd(x+k,y+k)=gcd(x+k,y-x) 也就要找最小的k,使a=gcd(x+k,y-x)!=1 这个里面y-x是固定的,枚举y-x的约数a,求min{a-x%a}。只需要枚举y-x的质因数a,因为%b0必然有%b的约数0 #include 阅读全文
posted @ 2025-08-24 09:04 arin876 阅读(9) 评论(0) 推荐(0)