Submission #1835149
Source Code Expand
import java.io.*; import java.util.*; class Main { public static void main(String[] args) { MyScanner sc = new MyScanner(); out = new PrintWriter(new BufferedOutputStream(System.out)); double[]p=new double[6],q=new double[6]; for(int i=0;i<6;++i)p[i]=sc.nextDouble(); for(int i=0;i<6;++i)q[i]=sc.nextDouble(); double a=0,b=0; for(int i=0;i<6;++i) if(p[i]==q[i]){ a+=p[i]/2;b+=p[i]/2; }else if(p[i]>q[i]) a+=p[i]; else b+=q[i]; out.println(Math.min(a,b)/100.0); out.close(); } // http://codeforces.com/blog/entry/7018 //-----------PrintWriter for faster output--------------------------------- public static PrintWriter out; //-----------MyScanner class for faster input---------- public static class MyScanner { BufferedReader br; StringTokenizer st; public MyScanner() { br = new BufferedReader(new InputStreamReader(System.in)); } String next() { while (st == null || !st.hasMoreElements()) { try { st = new StringTokenizer(br.readLine()); } catch (IOException e) { e.printStackTrace(); } } return st.nextToken(); } int nextInt() { return Integer.parseInt(next()); } long nextLong() { return Long.parseLong(next()); } double nextDouble() { return Double.parseDouble(next()); } String nextLine(){ String str = ""; try { str = br.readLine(); } catch (IOException e) { e.printStackTrace(); } return str; } } }
Submission Info
Submission Time | |
---|---|
Task | D - Dice Game |
User | kirika_comp |
Language | Java8 (OpenJDK 1.8.0) |
Score | 0 |
Code Size | 1937 Byte |
Status | WA |
Exec Time | 73 ms |
Memory | 23252 KB |
Judge Result
Set Name | Sample | All | ||||||
---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 1000 | ||||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | example0.txt, example1.txt |
All | 000.txt, 001.txt, 002.txt, 003.txt, 004.txt, 005.txt, 006.txt, 007.txt, 008.txt, 009.txt, 010.txt, 011.txt, 012.txt, 013.txt, 014.txt, 015.txt, 016.txt, 017.txt, 018.txt, 019.txt, 020.txt, 021.txt, 022.txt, 023.txt, 024.txt, 025.txt, 026.txt, 027.txt, 028.txt, 029.txt, 030.txt, 031.txt, 032.txt, 033.txt, 034.txt, 035.txt, 036.txt, 037.txt, 038.txt, example0.txt, example1.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
000.txt | AC | 72 ms | 17748 KB |
001.txt | AC | 71 ms | 19412 KB |
002.txt | WA | 72 ms | 20436 KB |
003.txt | AC | 72 ms | 18260 KB |
004.txt | AC | 72 ms | 19540 KB |
005.txt | WA | 72 ms | 19536 KB |
006.txt | WA | 72 ms | 21588 KB |
007.txt | WA | 73 ms | 19408 KB |
008.txt | WA | 70 ms | 23252 KB |
009.txt | WA | 70 ms | 19412 KB |
010.txt | WA | 72 ms | 18644 KB |
011.txt | WA | 70 ms | 19284 KB |
012.txt | WA | 71 ms | 19412 KB |
013.txt | WA | 73 ms | 19028 KB |
014.txt | WA | 70 ms | 18004 KB |
015.txt | WA | 71 ms | 16852 KB |
016.txt | WA | 72 ms | 18388 KB |
017.txt | WA | 71 ms | 21332 KB |
018.txt | WA | 73 ms | 21204 KB |
019.txt | WA | 70 ms | 21204 KB |
020.txt | WA | 71 ms | 19284 KB |
021.txt | WA | 72 ms | 20052 KB |
022.txt | WA | 71 ms | 21076 KB |
023.txt | WA | 71 ms | 18004 KB |
024.txt | WA | 69 ms | 19284 KB |
025.txt | WA | 70 ms | 18004 KB |
026.txt | WA | 71 ms | 18772 KB |
027.txt | WA | 71 ms | 21204 KB |
028.txt | WA | 72 ms | 16980 KB |
029.txt | WA | 71 ms | 17876 KB |
030.txt | WA | 71 ms | 18772 KB |
031.txt | WA | 71 ms | 18644 KB |
032.txt | WA | 72 ms | 19668 KB |
033.txt | WA | 73 ms | 21076 KB |
034.txt | WA | 71 ms | 19284 KB |
035.txt | WA | 71 ms | 20692 KB |
036.txt | WA | 70 ms | 18388 KB |
037.txt | WA | 71 ms | 21204 KB |
038.txt | WA | 70 ms | 17876 KB |
example0.txt | AC | 71 ms | 18004 KB |
example1.txt | AC | 71 ms | 19156 KB |