General
 
 
# Author Problem Lang Verdict Time Memory Sent Judged  
12190783 Practice:
3905
559A - 11 Java 7 Wrong answer on test 3 77 ms 0 KB 2015-07-23 02:01:50 2015-07-23 02:01:50
 
 
→ Source
import java.util.*;
public class Main {
static double coord[][];
static double findArea(int a,int b,int c){
	
  double area = (coord[a][0] - coord[c][0])*(coord[b][1] - coord[a][1]) - (coord[a][0] - coord[b][0])*(coord[c][1] - coord[a][1]);
   area /= 2;
   return Math.abs(area);
   
}	
public static void main(String [] args)throws Exception{
	
	Scanner in = new Scanner(System.in);
	
	int a1 = in.nextInt();
	int a2 = in.nextInt();
	int a3 = in.nextInt();
	int a4 = in.nextInt();
	int a5 = in.nextInt();
	int a6 = in.nextInt();
	
	double rad = Math.toRadians(60);
	
	coord = new double[6][2];
	
	coord[1][0] = a1*1.0;
	
	coord[2][0] = a2*Math.cos(rad) + a1; 
		coord[2][1] = a2*Math.sin(rad);
	
	coord[3][0] = -a3*Math.cos(rad) + coord[2][0]; 
		  coord[3][1] = coord[2][1] + a3*Math.sin(rad);
	
	coord[4][0] = coord[3][0] - a4; 
		coord[4][1] = coord[3][1];
	
	coord[5][0] = coord[4][0] - a5*Math.cos(rad);  
		coord[5][1] = coord[4][1] - Math.sin(rad);
	
    double ans = 0;
    
	double div = Math.pow(3,0.5)/4;
	
	ans += (findArea(0,5,4)) + (findArea(1,2,3)) + findArea(0,4,1) + findArea(4,3,1);
	
	System.out.print((int)Math.round(ans/div));
}
}
 
 
1
Time: 62 ms, memory: 0 KB
Verdict: OK
Input
1 1 1 1 1 1
Participant's output
6
Jury's answer
6
Checker comment
ok 1 number(s): "6"
 
 
2
Time: 77 ms, memory: 0 KB
Verdict: OK
Input
1 2 1 2 1 2
Participant's output
13
Jury's answer
13
Checker comment
ok 1 number(s): "13"
 
 
3
Time: 77 ms, memory: 0 KB
Verdict: WRONG_ANSWER
Input
2 4 5 3 3 6
Participant's output
80
Jury's answer
83
Checker comment
wrong answer 1st numbers differ - expected: '83', found: '80'