题目链接 : https://codeforces.com/problemset/problem/961/E One day Polycarp decided to rewatch his absolute favourite episode of well-known TV series "Tufurama". He was pretty surprised when he got results only for season 7 episode 3 with his search…
传送门 一眼主席树sbsbsb题(%%%树状数组大佬们). 简化题意:求满足x<y,y≤ax,x≤ayx<y,y\le a_x,x\le a_yx<y,y≤ax,x≤ay的(x,y)(x,y)(x,y)数量. 那么直接用主席树模拟题意就行了.(写完发现权值线段树就行了但是懒得改了) 代码: #include<bits/stdc++.h> #define ri register int using namespace std; typedef long long ll; i…
挺巧妙的数据结构题(不过据说这是一种套路? E. Tufurama One day Polycarp decided to rewatch his absolute favourite episode of well-known TV series "Tufurama". He was pretty surprised when he got results only for season 7 episode 3 with his search query of "Watch…
题面 One day Polycarp decided to rewatch his absolute favourite episode of well-known TV series "Tufurama". He was pretty surprised when he got results only for season 7 episode 3 with his search query of "Watch Tufurama season 3 episode 7 on…