-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathequality.java
More file actions
38 lines (34 loc) · 1.02 KB
/
equality.java
File metadata and controls
38 lines (34 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import java.util.*;
class main{
public static void main (String args[]) {
Scanner scn = new Scanner(System.in);
int n = scn.hasNextInt()?scn.nextInt():0;
int t = scn.hasNextInt()?scn.nextInt():0;
int arr[] = new int[n];
int tc[][] = new int[t][2];
for(int i=0;i<n;i++){
arr[i]=scn.hasNextInt()?scn.nextInt():0;
}
for(int i=0;i<t;i++){
arr[i][0]=scn.hasNextInt()?scn.nextInt():0;
arr[i][1]=scn.hasNextInt()?scn.nextInt():0;
}
int res=0;
for(i=0;i<t;i++){
int l=tc[i][0];
int r=tc[i][1];
for(int p=l;p<r-1;p++){
for(int q=p+1;q<r;q++){
if(p==l && q<r-1){
}
else if(p>l && q<r-1){
}
else if(p>l && q==r-1){
}
else if(p==l && q==r-1){
}
}
}
}
}
}