摘要:
"牛客挑战赛30" T1 随便枚举三个位置,然后二维前缀和即可。 cpp include using namespace std; typedef long long ll; int sum[505][505]; int n, a[505]; ll ans; int main() { int i, 阅读全文
摘要:
~~这里没有翻译~~ "Codeforces Round 545 (Div. 1)" T1 对于每行每列分别离散化,求出大于这个位置的数字的个数即可。 cpp include using namespace std; typedef long long ll; const int maxn(3e5 阅读全文
摘要:
"传送门" 第一步转化,令 $q[p[i]]=i$,那么题目变成: 有一些 $q[a[i]] using namespace std; typedef long long ll; const int maxn(5e5 + 5); int n, a[maxn], w[maxn], vis[maxn], 阅读全文