-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathidk.java
More file actions
65 lines (63 loc) · 1.76 KB
/
Copy pathidk.java
File metadata and controls
65 lines (63 loc) · 1.76 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/**
* Write a description of class idk here.
*
* @author (your name)
* @version (a version number or a date)
*/
import java.lang.*;
import java.util.Scanner;
import java.util.*;
public class idk
{
public static void main(String[] args){
Scanner in = new Scanner(System.in);
int session = in.nextInt();
int cown = in.nextInt();
int[] arr = new int[cown*session];
for(int i = 0; i< cown*session; i++){
arr[i] = in.nextInt();
}
int concount = 0;
int firstcow;
int secow;
int indic = 0;
int top;
boolean first = false;
boolean second = false;
boolean firstw = false;
boolean secondw = false;
for(int j = 1; j<=cown;j++){
firstcow = j;
for(int k = 1; k<=cown;k++){
indic = 0;
first = false;
second = false;
firstw = false;
secondw = false;
secow = k;
for(int f = 0; f<session;f++){
top = indic+4;
first = false;
second = false;
for(;indic<top;indic++){
if(arr[indic] == firstcow){
first = true;
}
if(arr[indic] == secow){
second = true;
}
if(first && !second){
firstw = true;
}
if(!first && second){
secondw = true;
}
}
}
if(secondw ^ firstw){
concount++;
}
}
}
}
}