摘要:
Code cpp include define N 2000008 using namespace std; struct sj{ int to,next; }a[N 2]; int size,head[N],n,k; void in(int &x) { char ch=getchar();int 阅读全文
摘要:
【问题描述】 hy 抄题解又被老师抓住了,现在老师把他叫到了办公室。 老师要 hy 和他玩一个游 戏。如果 hy 输了,老师就要把他开除信息组; 游戏分为 k 轮。在游戏开始之前,老师会将 n 个由英文字母组成的字符串放入箱子。 每局开始,字符串为空串,然后两人轮流在末尾追加字符,保证新的字符串为箱 阅读全文
摘要:
"题目链接" Solution 先离散化,然后开一个大小为 $100000$ 的树状数组记录前面出现过的数。 然后查询 $(h[i],n]$ 即可. 还要前后各做一遍。 Code cpp include define N 200008 define ll long long using namesp 阅读全文
摘要:
"题目链接" Solution 二维偏序问题。 现将所有点按照左端点排序,如此以来从左至右便满足了 $a_i define N 50010 define ll long long using namespace std; void in(ll &x) { char ch=getchar();ll f 阅读全文