-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainA.java
More file actions
69 lines (66 loc) · 1.98 KB
/
Copy pathMainA.java
File metadata and controls
69 lines (66 loc) · 1.98 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
66
67
68
69
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.HashMap;
import java.util.StringTokenizer;
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author rn-sshawish
*/
public class MainA {
public static void main(String[] args)throws Exception{
// BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
// HashMap<Integer, Integer> map = new HashMap<>();
// int n = Integer.parseInt(input.readLine());
// StringTokenizer tokn = new StringTokenizer(input.readLine());
// for (int i = 0; i < n; i++) {
// int value = Integer.parseInt(tokn.nextToken());
// map.put(value, map.getOrDefault(value, 0) + 1);
// }
// long count = 0;
// for (Integer value : map.values()) {
//
// count += sum(value-1);
//
// }
// System.out.println(count);
String h = "UDLR";
int count =0;
for (int i = 0; i < h.length(); i++) {
for (int j = 0; j < h.length(); j++) {
if (i == j) {
continue;
}
for (int k = 0; k <h.length(); k++) {
if (j==k || k== i) {
continue;
}
for (int l = 0; l < h.length(); l++) {
if (l==k || l==j || l== i) {
continue;
}
count++;
System.out.println(h.charAt(i)+""+h.charAt(j)+""+h.charAt(k)+""+h.charAt(l));
}
}
}
}
System.out.println(count);
System.out.println(Integer.toString(1111, 2));
}
public static long sum (int n ){
return n*(n+1L)/2L;
}
}
//15
//12
//1 4 4 4 4 4 9 9 9 5 1 2
//5
//4 4 4 4 4
//0001
//0010
//0100