Rezultati

Up. imeNalogaJezikRezultatČas oddaje
scnm1-2018 Droni Java 100/100OK 10. maj '18 @ 16:57

Test Točke Porabljen spomin Porabljen čas Status
#1 5/5 33,570 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#2 5/5 34,996 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#3 5/5 37,039 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#4 5/5 38,281 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#5 5/5 38,793 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#6 5/5 39,570 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#7 5/5 34,680 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#8 5/5 36,535 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#9 5/5 33,801 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#10 5/5 40,871 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#11 5/5 33,844 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#12 5/5 33,152 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#13 5/5 36,492 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#14 5/5 35,934 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#15 5/5 35,297 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#16 5/5 34,953 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#17 5/5 33,160 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#18 5/5 34,527 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#19 5/5 36,699 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.
#20 5/5 36,445 MiB 0,000 s OK
Povratna informacija sodniškega sistema:
​The output was correct.

Ocenjevani program (n2.java):
import java.io.*;
import java.util.*;
import java.math.*;

public class n2 {

	static int x1, y1, z1, x1k, y1k, z1k;
	static int x2, y2, z2, x2k, y2k, z2k;

	public static void print() {
		System.out.println("(" + x1 + " " + y1 + " " + z1 + ") (" + x2 + " " + y2 + " " + z2 + ")");
		if(x1==x2&&y1==y2&&z1==z2) {
			System.out.println("Napaka");
		}
	}

	public static void main(String[] args) throws Exception {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer(in.readLine());
		x1 = Integer.parseInt(st.nextToken());
		y1 = Integer.parseInt(st.nextToken());
		z1 = Integer.parseInt(st.nextToken());
		x1k = Integer.parseInt(st.nextToken());
		y1k = Integer.parseInt(st.nextToken());
		z1k = Integer.parseInt(st.nextToken());
		st = new StringTokenizer(in.readLine());
		x2 = Integer.parseInt(st.nextToken());
		y2 = Integer.parseInt(st.nextToken());
		z2 = Integer.parseInt(st.nextToken());
		x2k = Integer.parseInt(st.nextToken());
		y2k = Integer.parseInt(st.nextToken());
		z2k = Integer.parseInt(st.nextToken());
		print();
		if(z1==z2) {
			z1++;
			print();
		}
		while(true) {
			boolean worked1=false;
			if(x1k!=x1) {
				x1+=(x1k>x1?1:-1);
				worked1=true;
			}else if(y1k!=y1) {
				y1+=(y1k>y1?1:-1);
				worked1=true;
			}
			boolean worked2=false;
			if(x2k!=x2) {
				x2+=(x2k>x2?1:-1);
				worked2=true;
			}else if(y2k!=y2) {
				y2+=(y2k>y2?1:-1);
				worked2=true;
			}
			if(!worked1&&!worked2) {
				break;
			}else {
				print();
			}
		}
		if(x1==x2&&y1==y2) {
			x1++;
			print();
		}
		while(true) {
			boolean worked1=false;
			if(z1k!=z1) {
				z1+=(z1k>z1?1:-1);
				worked1=true;
			}
			boolean worked2=false;
			if(z2k!=z2) {
				z2+=(z2k>z2?1:-1);
				worked2=true;
			}
			if(!worked1&&!worked2) {
				break;
			}else {
				print();
			}
		}
		if(x1!=x1k) {
			x1--;
		}
		print();
	}

}