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

Submission #33401

Source Code Expand

Copy
```import java.util.*;
import java.util.regex.*;
import static java.lang.Math.*;
import static java.lang.System.out;

// AOJ 7
public class Main {
final Scanner sc=new Scanner(System.in);
final int[] vx={0,1,0,-1,-1,1,1,-1}, vy={-1,0,1,0,-1,-1,1,1};
final int INF=1<<26;
final long INFL=Long.MAX_VALUE/4;
final double EPS=1.0e-08;
public static void main(String[] args) {
//long s=System.currentTimeMillis();
new Main().A();
//new Main().doIt();
//out.println((System.currentTimeMillis()-s)+"msec");
}
void doIt(){
//new A();
}
void A(){
boolean[] l=new boolean[11],e=new boolean[11];
for(int i=0; i<6; i++)	e[sc.nextInt()]=true;
int b=sc.nextInt();
for(int i=0; i<6; i++)	l[sc.nextInt()]=true;
int eq=0;
for(int i=0; i<10; i++)	if(l[i] && e[i])	eq++;
if(eq==6)	System.out.println(1);
else if(eq==5 && l[b])	System.out.println(2);
else if(eq==5)	System.out.println(3);
else if(eq==4)	System.out.println(4);
else if(eq==3)	System.out.println(5);
else System.out.println(0);
}
static class Point{
int x, y;
Point(int x, int y){	this.x=x;	this.y=y;}
Point(){	this.x=0; this.y=0;}
@Override public String toString(){	return "("+this.x+","+this.y+")";}
static boolean ok(int x,int y,int X,int Y,int min){	return (min<=x&&x<X)&&(min<=y&&y<Y);}
static boolean ok(int x,int y,int X,int Y){	return ok(x,y,X,Y,0);}
}
}```

#### Submission Info

Submission Time 2012-07-21 20:14:57+0900 A - 宝くじ yabuuuuu Java (OpenJDK 1.7.0) 100 1407 Byte AC 486 ms 20732 KB

#### Judge Result

Set Name All
Score / Max Score 100 / 100
Status
 AC × 51
Set Name Test Cases
All 00_1_01.txt, 00_1_02.txt, 00_2_01.txt, 00_2_02.txt, 00_3_01.txt, 00_3_02.txt, 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, 00_sample_04.txt, 00_sample_05.txt, 01_rand_00.txt, 01_rand_01.txt, 01_rand_02.txt, 01_rand_03.txt, 01_rand_04.txt, 01_rand_05.txt, 01_rand_06.txt, 01_rand_07.txt, 01_rand_08.txt, 01_rand_09.txt, 01_rand_10.txt, 01_rand_11.txt, 01_rand_12.txt, 01_rand_13.txt, 01_rand_14.txt, 01_rand_15.txt, 01_rand_16.txt, 01_rand_17.txt, 01_rand_18.txt, 01_rand_19.txt, 01_rand_20.txt, 01_rand_21.txt, 01_rand_22.txt, 01_rand_23.txt, 01_rand_24.txt, 01_rand_25.txt, 01_rand_26.txt, 01_rand_27.txt, 01_rand_28.txt, 01_rand_29.txt, 01_rand_30.txt, 01_rand_31.txt, 01_rand_32.txt, 01_rand_33.txt, 01_rand_34.txt, 01_rand_35.txt, 01_rand_36.txt, 01_rand_37.txt, 01_rand_38.txt, 01_rand_39.txt
Case Name Status Exec Time Memory
00_1_01.txt AC 486 ms 20732 KB
00_1_02.txt AC 481 ms 20264 KB
00_2_01.txt AC 462 ms 20188 KB
00_2_02.txt AC 449 ms 20348 KB
00_3_01.txt AC 441 ms 20212 KB
00_3_02.txt AC 441 ms 20268 KB
00_sample_01.txt AC 447 ms 20324 KB
00_sample_02.txt AC 441 ms 20332 KB
00_sample_03.txt AC 445 ms 20332 KB
00_sample_04.txt AC 447 ms 20344 KB
00_sample_05.txt AC 436 ms 20336 KB
01_rand_00.txt AC 440 ms 20336 KB
01_rand_01.txt AC 444 ms 20320 KB
01_rand_02.txt AC 437 ms 20200 KB
01_rand_03.txt AC 447 ms 20252 KB
01_rand_04.txt AC 434 ms 20204 KB
01_rand_05.txt AC 443 ms 20260 KB
01_rand_06.txt AC 441 ms 20328 KB
01_rand_07.txt AC 439 ms 20272 KB
01_rand_08.txt AC 448 ms 20328 KB
01_rand_09.txt AC 445 ms 20268 KB
01_rand_10.txt AC 444 ms 20344 KB
01_rand_11.txt AC 433 ms 20276 KB
01_rand_12.txt AC 447 ms 20328 KB
01_rand_13.txt AC 458 ms 20272 KB
01_rand_14.txt AC 444 ms 20324 KB
01_rand_15.txt AC 443 ms 20272 KB
01_rand_16.txt AC 448 ms 20348 KB
01_rand_17.txt AC 454 ms 20328 KB
01_rand_18.txt AC 453 ms 20192 KB
01_rand_19.txt AC 454 ms 20360 KB
01_rand_20.txt AC 425 ms 20212 KB
01_rand_21.txt AC 433 ms 20340 KB
01_rand_22.txt AC 442 ms 20340 KB
01_rand_23.txt AC 460 ms 20196 KB
01_rand_24.txt AC 444 ms 20344 KB
01_rand_25.txt AC 447 ms 20340 KB
01_rand_26.txt AC 440 ms 20216 KB
01_rand_27.txt AC 446 ms 20356 KB
01_rand_28.txt AC 439 ms 20316 KB
01_rand_29.txt AC 439 ms 20328 KB
01_rand_30.txt AC 437 ms 20328 KB
01_rand_31.txt AC 437 ms 20188 KB
01_rand_32.txt AC 447 ms 20204 KB
01_rand_33.txt AC 455 ms 20276 KB
01_rand_34.txt AC 435 ms 20272 KB
01_rand_35.txt AC 448 ms 20272 KB
01_rand_36.txt AC 467 ms 20200 KB
01_rand_37.txt AC 435 ms 20304 KB
01_rand_38.txt AC 436 ms 20192 KB
01_rand_39.txt AC 444 ms 20208 KB