Rezultati

Up. imeNalogaJezikRezultatČas oddaje
lml-2018 Droni Java 100/100OK 10. maj '18 @ 19:32

Test Točke Porabljen spomin Porabljen čas Status
#1 5/5 39,582 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#2 5/5 37,539 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#3 5/5 59,871 MiB 0,424 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#4 5/5 54,660 MiB 0,258 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#5 5/5 55,027 MiB 0,224 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#6 5/5 54,449 MiB 0,341 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#7 5/5 41,066 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#8 5/5 37,586 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#9 5/5 34,281 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#10 5/5 61,949 MiB 0,796 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#11 5/5 39,777 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#12 5/5 39,582 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#13 5/5 39,367 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#14 5/5 34,508 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#15 5/5 36,461 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#16 5/5 34,949 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#17 5/5 38,629 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#18 5/5 37,113 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#19 5/5 34,402 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#20 5/5 39,352 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.

Ocenjevani program (Droni.java):
import java.util.*;
import java.lang.*;

public class Droni
{
    public static void main(String[]args)
    {
        Scanner skan = new Scanner(System.in);
        int x1 = skan.nextInt();
        int y1 = skan.nextInt();
        int z1 = skan.nextInt();
        int x2 = skan.nextInt();
        int y2 = skan.nextInt();
        int z2 = skan.nextInt();
        int x3 = skan.nextInt();
        int y3 = skan.nextInt();
        int z3 = skan.nextInt();
        int x4 = skan.nextInt();
        int y4 = skan.nextInt();
        int z4 = skan.nextInt();
        System.out.printf("(%d %d %d) (%d %d %d)\n",x1,y1,z1,x3,y3,z3);

        if(x1 == x3)
        {
            x1++;
            System.out.printf("(%d %d %d) (%d %d %d)\n",x1,y1,z1,x3,y3,z3);
        }

        while(y1 < y2)
        {
            y1++;

            if(y3 < y4)
            {
                y3++;
            }
            else if(y3 > y4)
            {
                y3--;
            }

            System.out.printf("(%d %d %d) (%d %d %d)\n",x1,y1,z1,x3,y3,z3);
        }

        while(y3 < y4)
        {
            y3++;

            if(y1 < y2)
            {
                y1++;
            }
            else if(y1 > y2)
            {
                y1--;
            }

            System.out.printf("(%d %d %d) (%d %d %d)\n",x1,y1,z1,x3,y3,z3);
        }

        while(y1 > y2)
        {
            y1--;

            if(y3 < y4)
            {
                y3++;
            }
            else if(y3 > y4)
            {
                y3--;
            }

           System.out.printf("(%d %d %d) (%d %d %d)\n",x1,y1,z1,x3,y3,z3);
        }

        while(y3 > y4)
        {
            y3--;

            if(y1 < y2)
            {
                y1++;
            }
            else if(y1 > y2)
            {
                y1--;
            }

           System.out.printf("(%d %d %d) (%d %d %d)\n",x1,y1,z1,x3,y3,z3);
        }

        while(z1 < z2)
        {
            z1++;

            if(z3 < z4)
            {
                z3++;
            }
            else if(z3 > z4)
            {
                z3--;
            }

            System.out.printf("(%d %d %d) (%d %d %d)\n",x1,y1,z1,x3,y3,z3);
        }

        while(z3 < z4)
        {
            z3++;

            if(z1 < z2)
            {
                z1++;
            }
            else if(z1 > z2)
            {
                z1--;
            }

           System.out.printf("(%d %d %d) (%d %d %d)\n",x1,y1,z1,x3,y3,z3);
        }

        while(z1 > z2)
        {
            z1--;

            if(z3 < z4)
            {
                z3++;
            }
            else if(z3 > z4)
            {
                z3--;
            }

            System.out.printf("(%d %d %d) (%d %d %d)\n",x1,y1,z1,x3,y3,z3);
        }

        while(z3 > z4)
        {
            z3--;

            if(z1 < z2)
            {
                z1++;
            }
            else if(z1 > z2)
            {
                z1--;
            }

            System.out.printf("(%d %d %d) (%d %d %d)\n",x1,y1,z1,x3,y3,z3);
        }

        if(y2 == y4 && z2 == z4)
        {
            z1++;
            System.out.printf("(%d %d %d) (%d %d %d)\n",x1,y1,z1,x3,y3,z3);
        }

        while(x1 < x2)
        {
            x1++;

            if(x3 < x4)
            {
                x3++;
            }
            else if(x3 > x4)
            {
                x3--;
            }

            System.out.printf("(%d %d %d) (%d %d %d)\n",x1,y1,z1,x3,y3,z3);
        }

        while(x3 < x4)
        {
            x3++;

            if(x1 < x2)
            {
                x1++;
            }
            else if(x1 > x2)
            {
                x1--;
            }

           System.out.printf("(%d %d %d) (%d %d %d)\n",x1,y1,z1,x3,y3,z3);
        }

        while(x1 > x2)
        {
            x1--;

            if(x3 < x4)
            {
                x3++;
            }
            else if(x3 > x4)
            {
                x3--;
            }

            System.out.printf("(%d %d %d) (%d %d %d)\n",x1,y1,z1,x3,y3,z3);
        }

        while(x3 > x4)
        {
            x3--;

            if(x1 < x2)
            {
                x1++;
            }
            else if(x1 > x2)
            {
                x1--;
            }

            System.out.printf("(%d %d %d) (%d %d %d)\n",x1,y1,z1,x3,y3,z3);
        }

        if(y2 == y4 && z2 == z4)
        {
            z1--;
           System.out.printf("(%d %d %d) (%d %d %d)\n",x1,y1,z1,x3,y3,z3);
        }
    }
}