Advertisement
Guest User

FGDF

a guest
Nov 17th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.52 KB | None | 0 0
  1. package com.example.user.solutie;
  2.  
  3. import java.util.List;
  4.  
  5. public class functie {
  6.  
  7. public find_drum(){
  8. private int n,m;
  9. /// initializez matricea
  10. private int Matrice[n+2][m+2];
  11. for(int i=0;i<=n+1;++i)
  12. for(int j=0;j<=m+1;++j)
  13. Matrice[i][j]=0;
  14. /// coordonate produse
  15. private int xp[Prod];
  16. private int yp[Prod];
  17. /// coordonate case
  18. private int xc[Case];
  19. private int yx[Case];
  20. ///coordonate raioane
  21. private int up[raioane];
  22. private int down[raioane];
  23. private int left[raioane];
  24. privare int right[raioane];
  25. /// presupun ca am coordonatele produselor deci le introduc in matrice
  26. for(int i=0;i<Prod;++i) Matrice[xp[i]][yp[i]]=1;
  27. /// introduc casele
  28. for(int i=0;i<Case;++i) Matrice[xc[i]][yc[i]]=2;
  29. /// introduc raioanele
  30. for(int i=0;i<raioane;++i)
  31. for(int j=up[i];j<=down[i];++j)
  32. for(int k=left[i];k<=right[i];++k)
  33. Matrice[j][k]=3;
  34. /// acum pot sa ma bag pe rezolvarea propriu zisa
  35. private int xcoord[1<<17];
  36. private int ycoord[1<<17];
  37. private int stramos[1<<17];
  38.  
  39. private int dirx[4]={-1,1,0,0};
  40. private int diry[4]={0,0,-1,1};
  41. public int st=1;
  42. public int dr=1;
  43. xcoord[1]=1;
  44. ycoord[1]=1;
  45. stramos[1]=0;
  46. while(st<=dr)
  47. {
  48.  
  49. }
  50. }
  51. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement