这名用户暂未设置签名。
追踪最近的用户名外显变动记录。
最近的文章、讨论、云剪贴板与社区记录
在讨论《请问(违规紫衫)》回复:
@[lcc0222](luogu://user/1536846)彳亍
在讨论《分数线》回复:
什么时候可以登奖项认证
# RT ```cpp #include using namespace std; #define int long long int n; const int maxn=1e6+10; int a[maxn]; int ans[maxn]; bool vis[maxn]; int maxx=INT_MIN; int…
在讨论《关于读入》回复:
```cpp ios::sync_with_stdio(0),cin.tie(0),cout.tie(0); ``` 这个
在讨论《关于读入》回复:
@[_Kagamine_Rin_](luogu://user/260985)快读写freopen前还是后
## U559540 美味度 *对于 50% 的数据范围,满足 1≤n≤10 3 , 保证 a i =b i , 并且所有的 a i 都相等。* #### 题目前50pts可以通过特殊性质获得a[i]==b[i] #### 证明每一个下表为i的a[i],b[i]的和都一样 #### 所以所有都能选取 可以用…
### U370610 回文串 这道题直接用常规实现回文操作 判断前后对称位置是否相同(回文定义) ```cpp #include using namespace std; string s; int n; const int maxn=1e5+10; char a[maxn]; char b[maxn]; //123…
## U562064 求和 这道题是一个数学题 比赛的时候想到有规律 毕竟题意 *对于 100% 的数据范围, 满足 1≤t≤10 5 ,1≤n≤10 6* 所以我先打了一个暴力代码再寻找规律 ### 暴力50分核心代码如下 ```cpp for(int i=0;i using namespace std; int t…
## P3865 【模板】ST 表 && RMQ 问题 ### 错误代码如下```cpp ```cpp #include #define int long long using namespace std; const int maxn=1e6+10; int n,m; int f[maxn][25]; int a[m…
```cpp #include using namespace std; const int maxn=2e5+10; int a[maxn]; int lg[maxn]; int fmax1[maxn][25]; int fmin1[maxn][25]; int x[maxn]; int maxx[maxn]; in…
```cpp #include using namespace std; #define int long long int m,d; const int maxn=1e6+10; const int maxx=25; int a[maxn]; int f[maxn][maxx]; int lg[maxn]; int…
# B3667 求区间所有后缀最大值的位置 ## 错误代码如下: ```cpp #include using namespace std; #define int long long int n,k; const int maxn=1e6+10; int a[maxn]; deque q; signed main(){…
在讨论《P1794 装备运输 二十分帮助》回复:
@[20090818Cc](luogu://user/1268457) 谢谢大佬 Ac了
```cpp #include using namespace std; int v,g; int n; long long T[505],V[505],G[505]; long long dp[505][505]; int main(){ ios::sync_with_stdio(0),cin.tie(0); cin…
```cpp #include using namespace std; /* 由于此题数据大 不能二维dp 滚动数组 1.确定状态 dp[i][j]表示前面i种物品容量为j时能装的最大价值 2.确定答案 dp[n][m] 3.状态转移方程 不装或装不下 dp[i]=pre[i] 装得下 dp[j]=dp[j-t[i]…
```cpp #include using namespace std; /* 1.确定状态 dp[i][j]表示前面i种物品中背包容量为j时能获得的最大价值 2.确定答案 dp[n][m] 3. 状态转移方程 不装或装不下 dp[i][j]=dp[i-1][j] 装得下 dp[i][j]=dp[i][j-w[i]]+…
在讨论《P2871 [USACO07DEC] Charm Bracelet S帮助》回复:
@[SRQ_321](luogu://user/1615478) AC了 谢谢大佬
# 72分 ```cpp #include using namespace std; int n,m; int w[12801],d[12801]; int dp[12801]; int pre[12801]; int main(){ ios::sync_with_stdio(0),cin.tie(0); cin>>n…
在讨论《给点水题》回复:
@[syc_want_AC](luogu://user/1447928) 之前就过了
# DP阶段测总结 ## P1115 最大子段和 #### 此题比较简单 需要注意的点是 : #### 题目描述: _选出其中连续且非空的一段使得这段和最大_ 所以不能跳着找最大字段和 只需要单层循环 ### 代码如下: ```cpp #include using namespace std; int n,a[2000…
在讨论《读不懂题》回复:
```cpp #include using namespace std; const int N=1e6+10; int n; struct S{ int x; int y; int z; }a[N]; bool cmp(S A,S B){ return A.z >n; for(int i=1;i >a[i].x>>a…
在讨论《洛谷csp奖项现在可以认证了吗》回复:
@[幻想繁星](/user/649095) 谢了
在讨论《洛谷csp奖项现在可以认证了吗》回复:
@[幻想繁星](/user/649095) 啊
在讨论《洛谷csp奖项现在可以认证了吗》回复:
@[幻想繁星](/user/649095) 出来了
在讨论《洛谷csp奖项现在可以认证了吗》回复:
@[mediocre_](/user/565707) ?