|

General

# Author Problem Lang Verdict Time Memory Sent Judged
53533694 Practice:
Verdusk
231D - 25 Java 8 Accepted 278 ms 0 KB 2019-04-30 02:28:33 2019-04-30 02:28:33

→ Source
import java.util.Scanner;

public class MagicBoxSimplified
{
static int x1, y1, z1;
static int xp, yp, zp;
static int[] num = new int[6];

public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);
xp = sc.nextInt();
yp = sc.nextInt();
zp = sc.nextInt();
x1 = sc.nextInt();
y1 = sc.nextInt();
z1 = sc.nextInt();

for(int i = 0; i < 6; i++)
{
num[i] = sc.nextInt();
}

int sum = 0;

if(xp < 0)sum += num[4];
else if(xp > x1)sum += num[5];

if(yp < 0)sum += num[0];
else if(yp > y1)sum += num[1];

if(zp < 0)sum += num[2];
else if(zp > z1)sum += num[3];

System.out.println(sum);
}

}


1
Time: 186 ms, memory: 0 KB
Verdict: OK
Input
2 2 2
1 1 1
1 2 3 4 5 6

Participant's output
12

12

Checker comment
ok 1 number(s): "12"


2
Time: 216 ms, memory: 0 KB
Verdict: OK
Input
0 0 10
3 2 3
1 2 3 4 5 6

Participant's output
4

4

Checker comment
ok 1 number(s): "4"


3
Time: 248 ms, memory: 0 KB
Verdict: OK
Input
0 1 2
1 1 1
634728 627299 454463 927148 298618 186257

Participant's output
927148

927148

Checker comment
ok 1 number(s): "927148"


4
Time: 218 ms, memory: 0 KB
Verdict: OK
Input
5 2 -4
1 1 1
279519 704273 181008 670653 198973 996401

Participant's output
1881682

1881682

Checker comment
ok 1 number(s): "1881682"


5
Time: 248 ms, memory: 0 KB
Verdict: OK
Input
5 5 0
3 1 3
832224 636838 995053 211585 505442 341920

Participant's output
978758

978758

Checker comment
ok 1 number(s): "978758"


6
Time: 248 ms, memory: 0 KB
Verdict: OK
Input
-1 -9 14
9 8 10
172575 215800 344296 98651 566390 47011

Participant's output
837616

837616

Checker comment
ok 1 number(s): "837616"


7
Time: 218 ms, memory: 0 KB
Verdict: OK
Input
95892 79497 69936
7 4 6
873850 132840 469930 271591 257864 626722

Participant's output
1031153

1031153

Checker comment
ok 1 number(s): "1031153"


8
Time: 248 ms, memory: 0 KB
Verdict: OK
Input
-263980 -876063 613611
2 3 14
63640 300066 460766 222639 51956 412622

Participant's output
338235

338235

Checker comment
ok 1 number(s): "338235"


9
Time: 216 ms, memory: 0 KB
Verdict: OK
Input
30 68 72
51 54 95
480054 561470 308678 472768 90393 992511

Participant's output
561470

561470

Checker comment
ok 1 number(s): "561470"


10
Time: 218 ms, memory: 0 KB
Verdict: OK
Input
19 60 75
11 64 92
768641 208726 47379 514231 858941 959876

Participant's output
959876

959876

Checker comment
ok 1 number(s): "959876"


11
Time: 218 ms, memory: 0 KB
Verdict: OK
Input
37 96 41
27 74 97
747624 148752 730329 406930 814825 993124

Participant's output
1141876

1141876

Checker comment
ok 1 number(s): "1141876"


12
Time: 186 ms, memory: 0 KB
Verdict: OK
Input
573 79 619
36 69 96
955743 245262 675667 699027 275227 783730

Participant's output
1728019

1728019

Checker comment
ok 1 number(s): "1728019"


13
Time: 218 ms, memory: 0 KB
Verdict: OK
Input
34271 -17508 -6147
456 567 112
804178 307516 306399 18981 989216 228388

Participant's output
1338965

1338965

Checker comment
ok 1 number(s): "1338965"


14
Time: 218 ms, memory: 0 KB
Verdict: OK
Input
-33064 176437 217190
181 507 575
161371 827160 733690 99808 584032 954632

Participant's output
1511000

1511000

Checker comment
ok 1 number(s): "1511000"


15
Time: 216 ms, memory: 0 KB
Verdict: OK
Input
967 -1346 2551
769 331 28
458319 885170 877010 533360 723416 248230

Participant's output
1239909

1239909

Checker comment
ok 1 number(s): "1239909"


16
Time: 278 ms, memory: 0 KB
Verdict: OK
Input
46643 53735 -19637
3268 9109 5377
679826 208720 919306 797520 856404 373419

Participant's output
1501445

1501445

Checker comment
ok 1 number(s): "1501445"


17
Time: 186 ms, memory: 0 KB
Verdict: OK
Input
7412 -524 9621
8748 8870 1521
1043 894084 881852 56954 415764 946495

Participant's output
57997

57997

Checker comment
ok 1 number(s): "57997"


18
Time: 248 ms, memory: 0 KB
Verdict: OK
Input
409501 -349039 -285847
4386 1034 7566
166804 981888 780353 956617 563457 238748

Participant's output
1185905

1185905

Checker comment
ok 1 number(s): "1185905"


19
Time: 216 ms, memory: 0 KB
Verdict: OK
Input
7669 1619 6208
2230 2327 8551
28791 762474 463311 687868 175185 383245

Participant's output
383245

383245

Checker comment
ok 1 number(s): "383245"


20
Time: 218 ms, memory: 0 KB
Verdict: OK
Input
2581 12373 -1381
2048 8481 7397
118694 862180 426553 229109 698247 387794

Participant's output
1676527

1676527

Checker comment
ok 1 number(s): "1676527"


21
Time: 248 ms, memory: 0 KB
Verdict: OK
Input
35273 82177 67365
69755 14857 39718
925457 138136 454985 609590 83655 611361

Participant's output
747726

747726

Checker comment
ok 1 number(s): "747726"


22
Time: 186 ms, memory: 0 KB
Verdict: OK
Input
58224 94433 40185
55683 99614 33295
137430 61976 671256 929825 499631 90071

Participant's output
1019896

1019896

Checker comment
ok 1 number(s): "1019896"


23
Time: 154 ms, memory: 0 KB
Verdict: OK
Input
-267768 -542892 844309
53169 60121 20730
760938 814929 213048 452483 867280 110687

Participant's output
2080701

2080701

Checker comment
ok 1 number(s): "2080701"


24
Time: 216 ms, memory: 0 KB
Verdict: OK
Input
441810 183747 823363
945702 484093 693802
149570 186362 344439 753794 467269 643649

Participant's output
753794

753794

Checker comment
ok 1 number(s): "753794"


25
Time: 218 ms, memory: 0 KB
Verdict: OK
Input
298742 556311 628232
360973 607625 301540
278905 531131 923271 701344 873950 969819

Participant's output
701344

701344

Checker comment
ok 1 number(s): "701344"


26
Time: 186 ms, memory: 0 KB
Verdict: OK
Input
366317 904079 468911
819427 99580 451147
291702 801137 380674 646951 890909 998554

Participant's output
1448088

1448088

Checker comment
ok 1 number(s): "1448088"


27
Time: 248 ms, memory: 0 KB
Verdict: OK
Input
722477 814197 501318
670293 164127 180084
665889 389403 663253 449990 909406 240043

Participant's output
1079436

1079436

Checker comment
ok 1 number(s): "1079436"


28
Time: 156 ms, memory: 0 KB
Verdict: OK
Input
701521 392984 524392
462491 968267 126043
328074 993331 895443 352976 984911 318865

Participant's output
671841

671841

Checker comment
ok 1 number(s): "671841"


29
Time: 186 ms, memory: 0 KB
Verdict: OK
Input
-827584 -680412 -103147
897186 313672 388429
892050 717946 505625 200144 311983 606037

Participant's output
1709658

1709658

Checker comment
ok 1 number(s): "1709658"


30
Time: 186 ms, memory: 0 KB
Verdict: OK
Input
381718 587052 14730
290055 960762 231879
646112 249417 451908 49140 819134 575870

Participant's output
575870

575870

Checker comment
ok 1 number(s): "575870"


31
Time: 186 ms, memory: 0 KB
Verdict: OK
Input
4 4 4
6 3 3
1 2 3 4 5 6

Participant's output
6

6

Checker comment
ok 1 number(s): "6"


32
Time: 248 ms, memory: 0 KB
Verdict: OK
Input
8 4 4
10 3 3
1 2 3 4 5 6

Participant's output
6

6

Checker comment
ok 1 number(s): "6"


33
Time: 248 ms, memory: 0 KB
Verdict: OK
Input
3 10 3
6 6 6
2 4 8 16 32 64

Participant's output
4

4

Checker comment
ok 1 number(s): "4"


34
Time: 248 ms, memory: 0 KB
Verdict: OK
Input
1 3 1
2 2 2
1 2 4 8 16 32

Participant's output
2

2

Checker comment
ok 1 number(s): "2"


35
Time: 216 ms, memory: 0 KB
Verdict: OK
Input
1 1 3
2 2 2
1 2 3 4 5 6

Participant's output
4

4

ok 1 number(s): "4"