git reimport
This commit is contained in:
37
archive/2018.10/2018.10.06 - unsorted/TaskA.java
Normal file
37
archive/2018.10/2018.10.06 - unsorted/TaskA.java
Normal file
@@ -0,0 +1,37 @@
|
||||
package chelper;
|
||||
|
||||
import io.InputReader;
|
||||
import io.OutputWriter;
|
||||
import misc.SimpleSavingChelperSolution;
|
||||
|
||||
|
||||
public class TaskA extends SimpleSavingChelperSolution {
|
||||
|
||||
public void solve(int testNumber, InputReader in, OutputWriter out) {
|
||||
wrapSolve(testNumber, in, out);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void solve(int testNumber) {
|
||||
int n = in.nextInt();
|
||||
char[] c = in.nextString().toCharArray();
|
||||
String s = in.nextString();
|
||||
boolean horizontal = false;
|
||||
if (s.contains("T")) {
|
||||
horizontal = true;
|
||||
}
|
||||
if (c[n - 1] == 'B' || c[n - 1] == 'T') {
|
||||
if (horizontal) {
|
||||
out.println(3);
|
||||
} else {
|
||||
out.println(2);
|
||||
}
|
||||
} else {
|
||||
if (horizontal) {
|
||||
out.println(2);
|
||||
} else {
|
||||
out.println(3);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
41
archive/2018.10/2018.10.06 - unsorted/TaskA.json
Normal file
41
archive/2018.10/2018.10.06 - unsorted/TaskA.json
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user