fork download
  1. import java.util.*;
  2. import java.lang.*;
  3. import java.io.*;
  4.  
  5. class Ideone
  6. {
  7. public static void main (String[] args) {
  8. Scanner in=new Scanner(System.in);
  9. int a1=in.nextInt();
  10. int b1=in.nextInt();
  11. int r1=in.nextInt();
  12. int a2=in.nextInt();
  13. int b2=in.nextInt();
  14. int r2=in.nextInt();
  15. int ax=in.nextInt();
  16. int bx=in.nextInt();
  17. int cx=in.nextInt();
  18. int ay=in.nextInt();
  19. int by=in.nextInt();
  20. int cy=in.nextInt();
  21. if ( ((ax-a1)*(ax-a1)+(ay-b1)*(ay-b1)<r1*r1)&&
  22. ((bx-a1)*(bx-a1)+(by-b1)*(by-b1)<r1*r1)&&
  23. ((cx-a1)*(cx-a1)+(cy-b1)*(cy-b1)<r1*r1)&&
  24. ((ax-a2)*(ax-a2)+(ay-b2)*(ay-b2)<r2*r2)&&
  25. ((bx-a2)*(bx-a2)+(by-b2)*(by-b2)<r2*r2)&&
  26. ((cx-a2)*(cx-a2)+(cy-b2)*(cy-b2)<r2*r2))
  27. {
  28. System.out.printf("На пересечении");
  29. }
  30. else
  31. {
  32. System.out.printf("Не на пересечении");
  33. }
  34. }
  35. }
Runtime error #stdin #stdout #stderr 0.14s 321344KB
stdin
1 2 3 4 5 6 7 8 6 7 4
stdout
Standard output is empty
stderr
Exception in thread "main" java.util.NoSuchElementException
	at java.util.Scanner.throwFor(Scanner.java:862)
	at java.util.Scanner.next(Scanner.java:1485)
	at java.util.Scanner.nextInt(Scanner.java:2117)
	at java.util.Scanner.nextInt(Scanner.java:2076)
	at Ideone.main(Main.java:20)