第一题:ASC
public class Main {
public static void main(String[] args) throws Exception{
System.out.println((int)('L'));
}
}
第二题:递增三元组
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Arrays;
public class Main {
static int N = (int)1e5 + 10;
static int[] a = new int[N];
static int[] b = new int[N];
static int[] c = new int[N];
public static void main(String[] args) throws Exception{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int n = Integer.parseInt(br.readLine());
String[] s = br.readLine().split(" ");
for(int i = 1; i <= n; i++) {
a[i] = Integer.parseInt(s[i-1]);
}
s = br.readLine().split(" ");
for(int i = 1; i <= n; i++) {
b[i] = Integer.parseInt(s[i-1]);
}
s = br.readLine().split(" ");
for(int i = 1; i <= n; i++) {
c[i] = Integer.parseInt(s[i-1]);
}
Arrays.sort(a, 1, n+1);
Arrays.sort(c, 1, n+1);
long res = 0;
for(int i = 1; i <= n; i++) {
int l = 1, r = n;
while(l < r) {
int mid = (l + r + 1) >> 1;
if(b[i] > a[mid]) l = mid ;
else r = mid - 1;
}
int t = 0;
if(a[r] < b[i]) t = r;
l = 1;
r = n;
while(l < r) {
int mid = (l + r) >> 1;
if(b[i] < c[mid]) r = mid;
else l = mid + 1;
}
if(b[i] < c[r]) res += (long)(t) * (n-r+1);
}
System.out.println(res);
}
}
第三题:环境治理
虽然 但是
第四题题:小球称重
会来还债~~~`