Contest Duration: - (local time) (100 minutes) Back to Home

Submission #3114507

Source Code Expand

Copy
```import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.util.StringTokenizer;

public class Main {

public static void main(String[] args) throws IOException {
InputStream inputStream = System.in;
OutputStream outputStream = System.out;
PrintWriter out = new PrintWriter(outputStream);
solver.solve(1, in, out);
out.close();
}

static int INF = 1 << 30;
static long LINF = 1L << 55;
static int MOD = 1000000007;
static int[] mh4 = { 0, -1, 1, 0 };
static int[] mw4 = { -1, 0, 0, 1 };
static int[] mh8 = { -1, -1, -1, 0, 0, 1, 1, 1 };
static int[] mw8 = { -1, 0, 1, -1, 1, -1, 0, 1 };

public void solve(int testNumber, InputReader in, PrintWriter out) {

int x1 = in.nextInt();
int y1 = in.nextInt();
int x2 = in.nextInt();
int y2 = in.nextInt();

int dx = x2-x1;
int dy = y2-y1;

int x3 = x2 - dy;
int y3 = y2 + dx;
int x4 = x3 - dx;
int y4 = y3 - dy;

out.printf("%d %d %d %d\n", x3, y3, x4, y4);

}
}

StringTokenizer tok;

public String nextString() {
while (!tok.hasMoreTokens()) {
try {
tok = new StringTokenizer(in.readLine(), " ");
} catch (IOException e) {
throw new InputMismatchException();
}
}
}

public int nextInt() {
return Integer.parseInt(nextString());
}

public long nextLong() {
return Long.parseLong(nextString());
}

public double nextDouble() {
return Double.parseDouble(nextString());
}

public int[] nextIntArray(int n) {
int[] res = new int[n];
for (int i = 0; i < n; i++) {
res[i] = nextInt();
}
return res;
}

public int[] nextIntArrayDec(int n) {
int[] res = new int[n];
for (int i = 0; i < n; i++) {
res[i] = nextInt() - 1;
}
return res;
}

public long[] nextLongArray(int n) {
long[] res = new long[n];
for (int i = 0; i < n; i++) {
res[i] = nextLong();
}
return res;
}

public long[] nextLongArrayDec(int n) {
long[] res = new long[n];
for (int i = 0; i < n; i++) {
res[i] = nextLong() - 1;
}
return res;
}

tok = new StringTokenizer("");
}
}

static long max(long... n) {
long ret = n[0];
for (int i = 0; i < n.length; i++) {
ret = Math.max(ret, n[i]);
}
return ret;
}

static int max(int... n) {
int ret = n[0];
for (int i = 0; i < n.length; i++) {
ret = Math.max(ret, n[i]);
}
return ret;
}

static long min(long... n) {
long ret = n[0];
for (int i = 0; i < n.length; i++) {
ret = Math.min(ret, n[i]);
}
return ret;
}

static int min(int... n) {
int ret = n[0];
for (int i = 0; i < n.length; i++) {
ret = Math.min(ret, n[i]);
}
return ret;
}

}
```

#### Submission Info

Submission Time 2018-09-01 21:15:36+0900 B - Ruined Square tutuz Java8 (OpenJDK 1.8.0) 200 3244 Byte AC 216 ms 22356 KB

#### Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
 AC × 3
 AC × 11
Set Name Test Cases
Sample s1.txt, s2.txt, s3.txt
All 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, s1.txt, s2.txt, s3.txt
Case Name Status Exec Time Memory
01.txt AC 102 ms 18260 KB
02.txt AC 123 ms 19536 KB
03.txt AC 125 ms 19924 KB
04.txt AC 117 ms 19412 KB
05.txt AC 125 ms 18644 KB
06.txt AC 97 ms 22356 KB
07.txt AC 108 ms 20564 KB
08.txt AC 114 ms 20820 KB
s1.txt AC 160 ms 21460 KB
s2.txt AC 123 ms 20692 KB
s3.txt AC 216 ms 19412 KB