Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <vector>
- using namespace std;
- typedef struct coordinates{
- int x;
- int y;
- int device;
- }Coordinates;
- typedef struct pairs{
- int source_device;
- int target_device;
- }Pairs;
- int n_places;
- int n_devices;
- int n_colliders;
- void main_function(int devices, int index){
- }
- int main(){
- int i;
- int x;
- int y;
- int source_device;
- int target_device;
- cin >> n_places;
- Coordinates coordinates_input[n_places];
- for (i=0;i<n_places;i++){
- cin>>x>>y;
- coordinates_input[i].x=x;
- coordinates_input[i].y=y;
- }
- cin>>n_devices>>n_colliders;
- Pairs pairs_inputs[n_colliders];
- int devices[n_devices];
- for(i=0;i<n_devices;i++){
- devices[i]=i+1;
- }
- for(i=0;i<n_colliders;i++){
- cin>>source_device>>target_device;
- pairs_inputs[i].source_device=source_device;
- pairs_inputs[i].target_device=target_device;
- }
- cout<<"Coordinates: "<<endl;
- cout<<" "<<endl;
- for(i=0;i<n_places;i++){
- cout<< coordinates_input[i].x<<" "<<coordinates_input[i].y<<endl;
- }
- cout<<" "<<endl;
- cout<<"End of Coordinates"<<endl;
- cout<<" "<<endl;
- cout<<"Pairs of Source and Targets: "<<endl;
- cout<<" "<<endl;
- for(i=0;i<n_colliders;i++){
- cout<< pairs_inputs[i].source_device<<" "<<pairs_inputs[i].target_device<<endl;
- }
- cout<<" "<<endl;
- cout<<"End of Pairs of Source and Targets"<<endl;
- cout<<" "<<endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement