It is not our abilities that show what we truly are. It is our choices.
追踪最近的用户名外显变动记录。
最近的文章、讨论、云剪贴板与社区记录
在讨论《想问本题二分答案的时间复杂度是否正确》回复:
这份代码只能过一半的点,剩下一半TLE了
```cpp #include using namespace std; const int N = 1e5+10; int T,n,q,a[N],b[N]; long long m; inline int read() { int s = 0,w = 1; char ch = getchar(); while(ch…
首先我们通过模拟一些样例可以得到一个贪心策略,**那就是从城市j出发,每次扩展到当前未经过的ai最小的城市**。这个策略是正确的。证明如下:设当前未经过的a值最小的城市为i,当前所占有的城市为[l,r],当前未经过的除i以外的一个城市j。当i r且j>r的情况同理。当i r的时候,若我们先往j走,最后j和i都可以走到,…
sy_zmq_001和Npse_D的题解提供的代码有误。 hack数据如下: 5 903 301 10000 301 30000 301 40000 302 1 303 2 正确答案:80000 这两篇题解代码输出的答案:70000
**题目大意:** 给你一个由 $n$ 个正整数组成的序列 $a$ ,求符合条件的四元组( $i$ , $j$ , $p$, $q$ )满足 $i$ , $j$ , $p$ , $q$ 互不相同且( $0$ , $0$ )、( $-a _ {i}$ , $a _ {j}$ )、( $a _ {p}$ , $a _ {q…
```cpp #include using namespace std; const int N = 1e5+10; int T,C,pos[N],mp[N*2],mp2[N*2],ans,sum[N]; char op[N]; map mp3; int main(){ cin>>T>>C; for(int i=1;i…
在讨论《蒟蒻50ptsTLE求调》回复:
已AC,此贴结束。将记录答案的循环里的map在循环外面赋值给一个变量即可通过。
```cpp #include using namespace std; const int N = 2e5+10,M = 32,K = 18; int n,q,b[N],cnt,p[M],p2[K]; long double dp[2][M][K],ANS[N]; unordered_map mp; struct T…
在文章《CSP游记》发表评论:
orz
在文章《2024 csp-j 游记》发表评论:
orz
在讨论《MnZn 20pts求助,不知道哪里出问题了》回复:
现在改到50pts了,不知道为什么有的时候搜索的第一个数不是char(n-1+'a')。
在讨论《MnZn 20pts求助,不知道哪里出问题了》回复:
```c #include using namespace std; const int N = 16; int n,vis[N]; char s[N]; int mp[N],pos[N],id[N],f[N],t[N],ans=1e9,ANSF[N],ANST[N],ANSID[N]; stack stk[3]; v…
```c #include using namespace std; const int N = 16; int n,vis[N]; char s[N]; int mp[N],pos[N],id[N],f[N],t[N],ans=1e9,ANSF[N],ANST[N],ANSID[N],stk[N][3],tp,tp2…
在讨论《求助大佬为什么这样写会出现牌数异常》回复:
我换了一种写法通过了,但我还是不明白为什么这一版代码的牌数会出现异常(一直增多)。
```c #include using namespace std; const int N = 24; int T,n,mp[N],ans=1e9,mp2[N]; struct T{ int num; int col; }a[N]; /* 1 13 8 2 6 3 8 4 12 3 3 2 13 1 10 4 9 2…
```c #include using namespace std; const int N = 1e5+10; #define int long long int T,n,m,a[N],b[N],t[N],u[N],v[N],vis[N],fa[N],match[N],tot[N],tot2[N]; vector G…
```c #include using namespace std; const int N = 2e6+10,md = 1e7+7; #define int long long //维护三棵差值平衡树,一棵平衡树维护的是两个相邻的数的差,一棵平衡树维护的是排序后的数,一棵平衡树维护的是排序后的数的差 int n,m,…
在讨论《蒟蒻60ptsTLE+MLE+WA求助大佬》回复:
此贴结,是数组开小了。
在讨论《蒟蒻60ptsTLE+MLE+WA求助大佬》回复:
发现一开始给边赋边权那块出了问题,改完后没有WA的了,但还有TLE和MLE的点,目前是80pts。
```c #include using namespace std; const int N = 5e5+10,M = 1e6+10,md = 1e9+7; int n,m,cnt,Siz,dfn[N],low[N],bri[M],f[N],siz[N],siz2[N]; long long int ans,dp[N]…
```c #include using namespace std; const int N = 1e5+10; int n,m,a[N]; struct T{ int l; int r; int cnt; int cntl; int cntm; int cntr; int cntl_2; int cntm_2; in…
在讨论《WA#41求调》回复:
此贴结,已查出错误,没有判如果A,B都是0的情况。
```c #include using namespace std; const int N = 110; #define int long long int A,B,C,a[N],b[N],c[N],p[N],x,y; signed main(){ cin>>A>>B>>C; p[0]=1; for(int i=1;…