版本比较
题解:P6845 [CEOI2019] Dynamic Diameter
正文
增加 3 行删除 3 行
22 行未改动2324252627272829303115 行未改动474849505151525354555657585960616162636465118 行未改动全部展开22 行未改动// Contest: Luogu// URL: https://www.luogu.com.cn/problem/P6845// Memory Limit: 1 MB// Time Limit: 3000 ms// //// Powered by CP Editor (https://cpeditor.org)
#include<bits/stdc++.h>using namespace std;15 行未改动 bool f=0; while(!isdigit(ch)){if(ch=='-') f=1;ch=getchar();} while(isdigit(ch)) x=(x<<1)+(x<<3)+(ch^48),ch=getchar(); if(f) x=-x; return x; return x; } template<typename T> inline void write(T x) { if(x<0) pc('-'),x=-x; if(x>9) write(x/10); pc(x%10+'0'); } }; using namespace IO;
const int N=1e5+10,M=2e5+10; int n,q,W; int h[N],w[M],e[M],ne[M],idx=1; int dis[N],go[N];118 行未改动全部展开