题目链接:https://cn.vjudge.net/contest/284294#problem/A 题目大意:主席树查询区间第k小. 具体思路:主席树入门. AC代码: #include<iostream> #include<stdio.h> #include<algorithm> #include<vector> using namespace std; # define ll long long ; struct node { int sum; in
import java.util.Scanner; public class _1区间K大数查询 { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int n= scanner.nextInt(); int[] shuzu = new int[n]; for (int i = 0; i < shuzu.length; i++) { shuzu[i] = scanner.next
http://www.lydsy.com/JudgeOnline/problem.php?id=3065 题意:带插入.修改的区间k小值在线查询.(原序列n<=35000, 询问<=175000) #include <bits/stdc++.h> using namespace std; const int nTr=1000005, nSg=15000005, alphaA=4, alphaB=5; int STop; struct Seg *Snull; struct Seg {