这名用户暂未设置签名。
追踪最近的用户名外显变动记录。
最近的文章、讨论、云剪贴板与社区记录
在讨论《蒟蒻求助,为什么一排序wa,不排序没事》回复:
测试点:100 30 100 22 35 4 2 30 45 29 64 31 31 2 73 25 84 32 9 45 71 12 28 23 46 40 1 35 94 25 0 6 20 50 33 28 12 3 98 6 76 38 64 1 41 31 42 9 33 34 75 7 97 44 58 3…
``` #include #include #include using namespace std; #define ll long long #define inf 0x3f3f3f3f ll n,m,w,dp[1001011]; struct NODE { int fa,sz; ll cos,val; bool…
``` #include #include #include #include #include using namespace std; string A,B,a[6],b[6]; unordered_map da,db; queue Q1,Q2; int num=0; int extrend(int tt) { i…
在讨论《蒻篛求助,wa了第2,5测试点》回复:
自写的查找替换函数只过了2个点qwq
``` #include #include #include #include #include using namespace std; string A,B,a[6],b[6]; unordered_map da,db; queue Q1,Q2; int num=0; /*string myreplace(stri…
``` #include using namespace std; #define ll long long #define maxn 50007 ll a[maxn],L; int n,m; ll judge(ll x) { bool h[maxn]={false}; ll tot=0; for(int i=0;i…
``` #include using namespace std; #define ll long long #define maxn 10000007 ll tree[maxn],lazy[maxn]; int n,m; string s; inline void push_up(int node,int left_…
```想试试递归行不行,但回溯出了些问题,输入样例,输出:terminate called after throwing an instance of 'std::length_error' what(): basic_string::_S_create,,网上说法感觉和我的对不上qwq #include #inclu…
在讨论《求助个位大佬!!!》回复:
@[Vvauted](/user/486187) 弄懂了,谢谢大佬
在讨论《求助大佬,想用A*算法和优先队列优化一下,但是不知道哪里错了》回复:
@[d0j1a_1701](/user/248302) 好好,谢谢大佬
在讨论《求助个位大佬!!!》回复:
我的代码(去掉update中的pushdown)有一组数据过不了,但是在自己的编译器里和洛谷的IDE里输出的跟答案一样qwq d答案输入; 8 10 640 591 141 307 942 58 775 133 2 1 5 2 3 8 2 3 6 2 5 8 2 4 8 1 4 8 60 2 1 6 2 5 8 1 3…
在讨论《求助个位大佬!!!》回复:
@[君と僕のNOIP](/user/136516) 不能等到query的时候再下移吗
在讨论《求助个位大佬!!!》回复:
@[8atemak1r](/user/305121) 假如我将[1-4]这个范围的值+1,让tag[1-4]+1,,然后将[1-2]这个范围的值+2时,不将[1-4]的tag下移,直接让tag[1-2]+2和ans[1-2]+2,等到求query[1-2]的时候,再将tag[1-4]下移,更新tag[1-2]的tag,…
在讨论《求助个位大佬!!!》回复:
求助各位大佬帮忙解答一下,困扰一天了,感觉更新的时候lazy标记没必要下移
为什么线段树的每一次区间更新操作都要将lazy标记下移,不应该等到求区间和的时候再下移?下面是题解,我把update的push_down操作注释了,wa了,我把我错误的数据下回来,输入输出跟答案一样qwq ``` #include #include #define MAXN 1000001 #define ll lon…
``` #include #include #include #include using namespace std; int n,m,k,x,y,a,b,ans; int dx[4] = {0,0,1,-1},dy[4] = {1,-1,0,0}; bool vis[6][6]; struct oo{ int x,…
在讨论《求助大佬,死活看不出哪里错了,用的Kruskal》回复:
@[Universal_xtr](/user/540148) 谢谢大佬,还帮忙改了,感激涕零
在讨论《求助大佬,死活看不出哪里错了,用的Kruskal》回复:
@[zhiyangfan](/user/137603) 谢谢大佬
```cpp #include #include #include using namespace std; struct bian { int head,tail,length; }; bool cmp(bian x,bian y) { return x.length >n>>m; for(int i=1;i >l[…
``` #include #include #include #include using namespace std; int m,vis[500][500]={0},d[5]={-1,0,1,0,-1},T[500][500]={0}; struct node { int x,y,t; }; int inmap(i…
在讨论《2,4wa了,7,10tle,萌新求助》回复:
没事了,已经解决
```cpp #include #include #include #include using namespace std; int n,A,B,vis[2100]={0},k[2100]; struct node { int num,step; }; int inmap(int x) { return x =1;…
在讨论《萌新求助,,样例过了,但是提交一堆mle》回复:
@[XQpig](/user/318960) 谢谢大佬,我想知道为什么用我的代码就会超出内存
``` #include double h[100]; int m[100],v[100]; void swap(int*x,int*y) { int tem=*x; *x=*y; *y=tem; } void swap2(double*x,double*y) { double tem=*x; *x=*y; *y=te…
``` #include int main() { int N,NA,NB,a[201],b[201],A=0,B=0,i,j=0,q=0,c[201][201]={{0,-1,1,1-1},{1,0,-1,1,-1},{-1,1,0,-1,1},{-1,-1,1,0,1},{1,1,-1,-1,0}}; scanf(…
在讨论《0分,求助大佬》回复:
但我想知道为啥用longlong
在讨论《0分,求助大佬》回复:
改了long long,accept了
```c #include #include int main() { int n,i,j,c[10000]={0},h,v,t=0,q; char a[10000],b[25][20]={"zero","one","two","three","four","five","six","seven","eight","n…
``` #include int main() { int j,i=0,q,w,x,y,z,h,count=0,sum,s,W,X,H; int x2[100],y2[100],z2[100],x1[100],y1[100],z1[100],a[20][20][20]; scanf("%d%d%d%d",&W,&X,&…