Submission #3117513
Source Code Expand
import java.lang.*;
import java.io.*;
import java.util.*;
class Main{
public static void main(String args[]) throws FileNotFoundException{
FScanner sc=new FScanner();
//Scanner sc=new Scanner(System.in);
int[] num=sc.readIntL();
int[] a=new int[]{num[0],num[1]};
int[] b=new int[]{num[2],num[3]};
int da=0;
int db=0;
da=a[0]-b[0];
db=a[1]-b[1];
//System.out.println(da);
int[] c=new int[]{b[0]+db,b[1]-da};
//System.out.println(c[0]);
int[] d=new int[]{c[0]+da,c[1]+db};
System.out.printf("%d %d %d %d\n",c[0],c[1],d[0],d[1]);
//disp(num);
}
static void solve(){}
static void disp(int[] data){
for(int i=0; i<data.length; i++){
System.out.printf("%d ",data[i]);
}
System.out.println();
}
static void disp(String[] data){
for(int i=0; i<data.length; i++){
System.out.printf("%s ",data[i]);
}
System.out.println();
}
static class FScanner{
Scanner sc;
FScanner() throws FileNotFoundException{
sc=new Scanner(System.in);
}
boolean hasNextLine(){
boolean has=true;
if(!sc.hasNextLine()){
has=false;
}
return has;
}
int readInt(){
int i=sc.nextInt();
return i;
}
long readLong(){
long i=Long.parseLong(sc.nextLine());
return i;
}
int[] readIntL(){
String[] buf=sc.nextLine().split(" ");
int[] num=new int[buf.length];
for(int i=0; i<buf.length; i++){
num[i]=Integer.parseInt(buf[i]);
}
return num;
}
String readString(){
return sc.nextLine();
}
String[] readStringL(String dlm){
String[] s=sc.nextLine().split(dlm);
return s;
}
}
}
Submission Info
| Submission Time | |
|---|---|
| Task | B - Ruined Square |
| User | tokumei_jp |
| Language | Java8 (OpenJDK 1.8.0) |
| Score | 200 |
| Code Size | 1685 Byte |
| Status | AC |
| Exec Time | 117 ms |
| Memory | 23764 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 200 / 200 | ||||
| Status |
|
|
| 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 | 92 ms | 20820 KiB |
| 02.txt | AC | 90 ms | 21844 KiB |
| 03.txt | AC | 92 ms | 21716 KiB |
| 04.txt | AC | 91 ms | 21844 KiB |
| 05.txt | AC | 94 ms | 21332 KiB |
| 06.txt | AC | 93 ms | 21204 KiB |
| 07.txt | AC | 91 ms | 23764 KiB |
| 08.txt | AC | 92 ms | 20948 KiB |
| s1.txt | AC | 93 ms | 21840 KiB |
| s2.txt | AC | 91 ms | 21588 KiB |
| s3.txt | AC | 117 ms | 21076 KiB |