这名用户暂未设置签名。
追踪最近的用户名外显变动记录。
最近的文章、讨论、云剪贴板与社区记录
在讨论《求最优算法》回复:
补一下,$f(S)=(\sum_{0\le i<|S|}|S|\cdot \{S_i\})\bmod(10^9+7)$
自己脑子一热,想到一道题: 对于字符串 $S$,定义 $f(S)=(\sum_{0\le i<|S|}|S|\cdot{S_i})\bmod(10^9+7)$,其中 $|S|$ 表示 $S$ 的长度,$\{c\}$ 表示字符 $c$ 的 $ASCII$ 码。现在给定字符串 $S$,记 $S$ 的子串的集合为 $A$,求…
在讨论《求助最短路,悬关》回复:
@[includeCPP](/user/228458) 谢谢大佬
P4779只拿了52pts,求助大佬 代码: ```cpp #include #define fr first #define sc second #define N 100010 #define mod 998244353 #define inf 2147483647 #define ll long long #de…
在讨论《P3372线段树求助(悬关)》回复:
@[microchip](/user/241838) @[BFSDFS123](/user/358739) @[_masppy_](/user/599287) 谢谢大佬
求助大佬,我这样写线段树有什么问题吗? 代码: ```cpp #include #define fr first #define sc second #define N 100010 #define mod 998244353 #define inf 2147483647 #define ll long long us…
在讨论《蒟蒻的求助》回复:
你要先看一遍普及组大纲,看有没有不会的,比如你最短路只学了Dijkstra,你还要学SPFA(求负环),Floyd,还有次短路。之后多刷难题(绿题蓝题) DP的话,你先把所有的DP类型学掉,然后多刷题,尤其是背包,状压,树上图上的DP还有一些很难看出的DP.
在讨论《求助qwq》回复:
dfs板子题,数据很小,暴力搜就行 ```cpp #include #define N 60 #define ll long long using namespace std; int t, n, m; bool vis[N][N]; int dx[2] = {1, 0}, dy[2] = {0, 1}; char a…
在讨论《求助,悬一关》回复:
这题要用到排列组合的知识,构造一个矩形相当于在$m$行中选两个点,在$n$列中选两个点,所以共有$C_m^2\times C_n^2$个矩形,即$\frac{mn(m-1)(n-1)}{4}$个 代码如下: ```cpp #include using namespace std; long long n, m; con…
在讨论《85pts求助!!!》回复:
@[oyq784580](/user/547261) 谢谢大佬已过!
[题目传送门P5657](https://www.luogu.com.cn/problem/P5657) [评测记录](https://www.luogu.com.cn/record/121831158) 代码: ```cpp #include #define ull unsigned long long using…
[P8475 「GLR-R3」雨水](https://www.luogu.com.cn/problem/P8475) [评测记录](https://www.luogu.com.cn/record/118733671) 求助大佬,为什么会有MLE? 代码: ```cpp #include // scanf #includ…
在讨论《求解极限》回复:
@[Loic_](/user/323362) @Naly_Fish 谢谢,已关
我们班同学出了一道题,我感觉这题出错了,大佬们看看,这题到底能不能做 $$ \lim_{\infty\rightarrow2}{\frac{(x-1)^2+x+5!}{x^2+x^3}} $$ 求助(悬赏关注)!!!
在讨论《萌新刚学OI,求助》回复:
结构体只要其中一个元素变动,所有其他元素也跟着变动 具体代码如下: ```cpp bool cmp(student x,student y){ return x.a y.a; } ``` 从大到小排序这样写 ```cpp sort(a + 1,a + 1 + 114514,cmp); ``` sort这样写 (完美结束…