Advertisement
Guest User

Untitled

a guest
Dec 1st, 2020
18
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.30 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. #include <vector>
  4. #include <algorithm>
  5.  
  6. using namespace std;
  7.  
  8. int main()
  9. {
  10. while (1)
  11. {
  12. vector<vector<int>> checkpoints;
  13. vector<int> biais;
  14. bool passage = false;
  15. bool passage_cp = false;
  16. string arg_puiss;
  17. int x, y, nextCheckpointX, nextCheckpointY, nextCheckpointDist, nextCheckpointAngle, opponentX, opponentY;
  18. cin >> x >> y >> nextCheckpointX >> nextCheckpointY >> nextCheckpointDist >> nextCheckpointAngle; cin.ignore();
  19. cin >> opponentX >> opponentY; cin.ignore();
  20.  
  21. biais.push_back(nextCheckpointX);
  22. biais.push_back(nextCheckpointY);
  23.  
  24. for(int i = 0; i<=checkpoints.size();i++)
  25. {
  26. if (((checkpoints[i][0] != biais[0]) || (checkpoints[i][1] != biais[1])) && (passage_cp == false))
  27. {
  28. checkpoints.push_back(biais);
  29. } else
  30. {
  31. passage_cp = true;
  32. }
  33. }
  34.  
  35.  
  36. if ((nextCheckpointAngle > 90) || (nextCheckpointAngle < -90))
  37. {
  38. arg_puiss = " 25";
  39. } else
  40. {
  41. arg_puiss = " 100";
  42. }
  43.  
  44. // if ((nextCheckpointDist < 4000) && (nextCheckpointDist > 3000) && ((nextCheckpointAngle < 90) || (nextCheckpointAngle > -90)))
  45. // {
  46. // arg_puiss = " 90";
  47. // } else if ((nextCheckpointDist < 3000) && (nextCheckpointDist > 1000) && ((nextCheckpointAngle < 90) || (nextCheckpointAngle > -90)))
  48. // {
  49. // arg_puiss = " 80";
  50. // } else if ((nextCheckpointDist < 1000) && ((nextCheckpointAngle < 70) && (nextCheckpointAngle > -90)))
  51. // {
  52. // arg_puiss = " 45";
  53. // } else if ((nextCheckpointDist > 5000) && ((nextCheckpointAngle < 90) && (nextCheckpointAngle > -90)))
  54. // {
  55. // arg_puiss = " 100";
  56. // }
  57.  
  58.  
  59. if ((nextCheckpointDist <= 8000) && (nextCheckpointDist >= 6000) && (passage == false) && (nextCheckpointAngle <= 20) && (nextCheckpointAngle >= -20))
  60. {
  61. arg_puiss = " BOOST";
  62. passage = true;
  63. }
  64.  
  65.  
  66.  
  67. cout << nextCheckpointX << " " << nextCheckpointY << arg_puiss << endl;
  68. cerr << checkpoints[0][0] << checkpoints[0][1] << endl;
  69. }
  70. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement