Ian_ZSC


私信TA

用户名:dotcpp0646049

访问量:57

签 名:

等  级
排  名 25731
经  验 539
参赛次数 0
文章发表 1
年  龄 0
在职情况 学生
学  校 泉州师范学院
专  业 软件开发

  自我简介:

TA的其他文章

import java.util.Scanner;

public class Main {

public static void main(String[] args) {
Scanner scr = new Scanner(System.in);
int N = scr.nextInt();
int[] A=new int[N];
int[] B=new int[N];
int[] C=new int[N];
scr.nextLine();

String Line=scr.nextLine();
for(int j=0;j<N;j++) {
A[j]=Integer.parseInt(Line.split(" ")[j]);
}
Line=scr.nextLine();
for(int j=0;j<N;j++) {
B[j]=Integer.parseInt(Line.split(" ")[j]);
}
Line=scr.nextLine();
for(int j=0;j<N;j++) {
C[j]=Integer.parseInt(Line.split(" ")[j]);
}
//枚举所有三元组组合
int res=0;
for(int i=0;i<N;i++) {
for(int j=0;j<N;j++) {
for(int k=0;k<N;k++) {
if(A[i]<B[j]&&B[j]<C[k]) {//判断是否满足条件
res++;
}
}
}

}
System.out.print(res);


}




}

解题思路:

注意事项:

参考代码:



 

0.0分

0 人评分

看不懂代码?想转换其他语言的代码? 或者想问其他问题? 试试问问AI编程助手,随时响应你的问题:

编程语言转换万能编程问答  

代码解释器

代码纠错

SQL生成与解释

  评论区