人如机
追踪最近的用户名外显变动记录。
最近的文章、讨论、云剪贴板与社区记录
# P11362 思路 **模拟以下样例** ``` 10 11 2 10 2 7 2 7 2 2 2 3 2 4 2 10 2 7 2 10 2 3 2 3 2 ``` 模拟完,发现结果与d无关(然而并没有什么用) **正向考虑了很久,发现并不好做,考虑反向** 然而最后还是回到正向了,不过反向用来过渡确实好思考很多…
```cpp #include using namespace std; #define int long long const int maxn=1e5+1; const int maxm=1e9+1; // queue q; long long T,Q,M; struct SGT{ long long a[4*ma…
在讨论《求调》回复:
@[pika_](luogu://user/1038404)蟹蟹蟹蟹!!
```cpp #include using namespace std; void build(int,int,int); const int maxn=1e5+1; int a[4*maxn],flag[4*maxn]; int n,m; int mid(int l,int r){ return (l+r)/2; }…
```cpp #include using namespace std; const int maxn=1e5+1; const int maxe=1e5+1; int fa[maxn]; int n,m; int ans,e_cnt; struct edge { int u,v,w,cnt; }e[maxe]; bo…
在讨论《Dijkstra 90分 求调》回复:
@[GDDS](luogu://user/1095782) 嗷嗷嗷,要输出2^31 -1
```cpp #include using namespace std; const int maxn = 1e6+5; const int maxe = 1e6+5; const int inf=0x7f; int n,m,s; int dis[maxn]; int vis[maxn]; typedef pair p…
在讨论《线段树求区间和》回复:
@[Gapple](/user/481437) 应该是吧(不知道query啥意思
在讨论《线段树求区间和》回复:
@[Gapple](/user/481437) 写出来线段树了,但是不会求和qwq
在讨论《线段树求区间和》回复:
@[ZMQ_Ink6556](/user/1125291) @[lzj666_luogu](/user/836542) 感谢大佬
在讨论《问如何实现如这种排列》回复:
dfs加个后面的大于前面的的判断
在讨论《不会二维数组怎么办?》回复:
学
在讨论《TLE + WA + AC 邻接表+dfs 求调!!》回复:
@[LJY_ljy](/user/84987) 咋解决啊大佬
```cpp #include using namespace std; void add(int,int,int); long long u,v,len,top,n,m,ans=-1,flag=1; struct edge{ long long u,v,len; edge *next; }; struct node{…