Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <vector>
- #include <algorithm>
- using namespace std;
- int main()
- {
- while (1)
- {
- vector<vector<int>> checkpoints;
- vector<int> biais;
- bool passage = false;
- bool passage_cp = false;
- string arg_puiss;
- int x, y, nextCheckpointX, nextCheckpointY, nextCheckpointDist, nextCheckpointAngle, opponentX, opponentY;
- cin >> x >> y >> nextCheckpointX >> nextCheckpointY >> nextCheckpointDist >> nextCheckpointAngle; cin.ignore();
- cin >> opponentX >> opponentY; cin.ignore();
- biais.push_back(nextCheckpointX);
- biais.push_back(nextCheckpointY);
- for(int i = 0; i<=checkpoints.size();i++)
- {
- if (((checkpoints[i][0] != biais[0]) || (checkpoints[i][1] != biais[1])) && (passage_cp == false))
- {
- checkpoints.push_back(biais);
- } else
- {
- passage_cp = true;
- }
- }
- if ((nextCheckpointAngle > 90) || (nextCheckpointAngle < -90))
- {
- arg_puiss = " 25";
- } else
- {
- arg_puiss = " 100";
- }
- // if ((nextCheckpointDist < 4000) && (nextCheckpointDist > 3000) && ((nextCheckpointAngle < 90) || (nextCheckpointAngle > -90)))
- // {
- // arg_puiss = " 90";
- // } else if ((nextCheckpointDist < 3000) && (nextCheckpointDist > 1000) && ((nextCheckpointAngle < 90) || (nextCheckpointAngle > -90)))
- // {
- // arg_puiss = " 80";
- // } else if ((nextCheckpointDist < 1000) && ((nextCheckpointAngle < 70) && (nextCheckpointAngle > -90)))
- // {
- // arg_puiss = " 45";
- // } else if ((nextCheckpointDist > 5000) && ((nextCheckpointAngle < 90) && (nextCheckpointAngle > -90)))
- // {
- // arg_puiss = " 100";
- // }
- if ((nextCheckpointDist <= 8000) && (nextCheckpointDist >= 6000) && (passage == false) && (nextCheckpointAngle <= 20) && (nextCheckpointAngle >= -20))
- {
- arg_puiss = " BOOST";
- passage = true;
- }
- cout << nextCheckpointX << " " << nextCheckpointY << arg_puiss << endl;
- cerr << checkpoints[0][0] << checkpoints[0][1] << endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement