我为自我而战,直至一切,燃烧殆尽!|While someone sees crazy ones,we see genius.
追踪最近的用户名外显变动记录。
最近的文章、讨论、云剪贴板与社区记录
在讨论《一个拓展问题,悬二关》回复:
@[DFLJ](luogu://user/1228191) 谢,已关
在讨论《一个拓展问题,悬二关》回复:
@[Miss_SGT](luogu://user/705012) 谢,已关
在讨论《0分 WA求调教 悬一关》回复:
@[__Shellchen__](luogu://user/1937850) 已关
在讨论《0分 WA求调教 悬一关》回复:
@[__Shellchen__](luogu://user/1937850) 谢
```cpp #include #define int long long using namespace std; int n,t; int ps[5005],pb[5005]; int f[5005][2]; //0:踏错 1:踏对 int sum[5005]; main() { ios::sync_with_st…
```cpp #include #define int long long using namespace std; string s; int n; int f[45][100005]; main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); cin>>s…
我代码的问题:如果有多解,则尽可能让前面的人少抄写。 ```cpp #include #define int long long using namespace std; //隔版法做 int n,k; int a[505]; int f[505][505];//前 i 本书,给 j 个人 int qzh[505];…
在文章《退役记》发表评论:
祝好
在讨论《关于CSP:DP 优化》回复:
@[pengbonan](luogu://user/1005693) 我也不清楚
在讨论《关于CSP:DP 优化》回复:
@[Martlet](luogu://user/543717) 多重背包二进制优化
在讨论《求助:关于 DP》回复:
@[喵仔牛奶](luogu://user/560516) ok
在讨论《求助:关于 DP》回复:
@[I_Love_DS](luogu://user/1118614) 谢
在讨论《求助:关于 DP》回复:
@[Register_int](luogu://user/406941) 多谢
在讨论《TLE on#9 ,悬一关求条》回复:
@[zyzxzhangyi](luogu://user/1050256) thk,已关
```cpp #include #define int long long using namespace std; int dp[25][1100010]; int n; int jz[25][25]; main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0)…
在讨论《WA求条,悬两关》回复:
@[FHY_patrickpp](luogu://user/1287677) 我知道是什么问题,但我调不出来
```cpp #include using namespace std; int cl[200005]; int c[200005]; int cnt; int cntans; int ans[200005]; //1:red 2: black 3:white main() { ios::sync_with_stdio…
### 思路: 记录一个 $ans$ 为已经有的评论数,$res$ 为通过选择加好友而获得的评论数的最大值。 开一个 $map$,其中 $map[a,b]$ 表示 a 在 b 评论了多少。 $gx[i]$ 表示在只选 i 时多的评论个数。 对于每个评论 $x,y$: - 如果都是朋友,$ans$ 加一。 - 如果只有一…
#### 思路 观察发现,要想存在更多的 $\texttt{nanjing}$ 子串,首先需要保证原本是 $\texttt{nanjing}$ 的子串不受影响。其次,唯一的添加方法就是使原来的字符串的部分后缀与部分前缀进行拼接,变成 $\texttt{nanjing}$。 所以只需要枚举左移 $0$ 到 $\min(k…
### 思路: 有点小暴力,从大到小循环每个数 $i$,求出他和 $1$ 到 $n$ 中的数的最大异或结果。再加上异或结果,把两个数打上标记就可以了。 ### 代码: ```cpp #include #define int long long using namespace std; int n; int x[1000…
### 提醒:建议大家看原题意 ~~不然就会像我一样不知道一个点只能连往外连 1 条边,也不知道允许自环。~~ ### 思路: 分类讨论,$1$ 到 $k$ 为第一类,$k+1$ 到 $n$ 为第二类。 - 第一类,对于每个属于 $1$ 到 $k$ 的节点: 满足 $1$ 到 $k$ 的节点在一个环里。所以只要保证 $…