LI /* 没有考虑次大值有大于一个的情况 */ #include<iostream> #include<cstdio> #include<cstring> #define N 1000007 using namespace std; int n,m,ans,cnt,mx; int a[N]; inline int read() { ,f=;char c=getchar(); ;c=getchar();} +c-';c=getchar();} return x*f;…
#include<iostream> #include<cstdio> #include<cstring> #include<algorithm> #define N 1000010 using namespace std; int n,a[N],cnt1,cnt2; int read() { ,f=;char c=getchar(); ;c=getchar();} +c-';c=getchar();} ; } int main() { scanf(&quo…
#include<iostream> #include<cstdio> #include<cstring> #include<stack> #define N 100007 using namespace std; char ch[N]; int ans,pos; stack<char>s; int main() { freopen("shower.in","r",stdin); freopen("…
三向城 /* 原图一定是一棵完全二叉树. 根节点是x,左节点是x*2,右节点是x*2+1 转化为二进制往左右走就很明显了. */ #include<iostream> #include<cstdio> #include<cstring> #define ll long long using namespace std; int T,x,y,k,ans,pos; inline int read() { ,f=;char c=getchar(); ;c=getchar();…