#include <iostream>
#include <vector>
using namespace std;
struct configcarros
{
int num_car, tempodevolta;
};
int main()
{
int C,V, tempo;
cin >> C >> V;
vector<configcarros> cars;
configcarros c1;
c1.num_car = 1;
c1.tempodevolta = 30;
cars.push_back(c1);
configcarros c2{2, 35}; //inicializar logo com os 2 valores
cars.push_back(c2);
cars.push_back(configcarros{5,15});
cout<<"Aceder a posição 0:"<<cars[0].num_car<<" "<<cars[0].tempodevolta<<endl;
cout<<"Mostrando todos com um for"<<endl;
for (int i = 0; i < cars.size(); i++){
cout<<cars[i].num_car<<" "<<cars[i].tempodevolta<<endl;
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8dmVjdG9yPgoKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCnN0cnVjdCBjb25maWdjYXJyb3MKewogICAgaW50IG51bV9jYXIsIHRlbXBvZGV2b2x0YTsKfTsKCmludCBtYWluKCkKewogICAgaW50IEMsViwgdGVtcG87CiAgICBjaW4gPj4gQyA+PiBWOwoKICAgIHZlY3Rvcjxjb25maWdjYXJyb3M+IGNhcnM7CgogICAgY29uZmlnY2Fycm9zIGMxOwogICAgYzEubnVtX2NhciA9IDE7CiAgICBjMS50ZW1wb2Rldm9sdGEgPSAzMDsKCiAgICBjYXJzLnB1c2hfYmFjayhjMSk7CiAgICAKICAgIGNvbmZpZ2NhcnJvcyBjMnsyLCAzNX07IC8vaW5pY2lhbGl6YXIgbG9nbyBjb20gb3MgMiB2YWxvcmVzCiAgICBjYXJzLnB1c2hfYmFjayhjMik7CgogICAgY2Fycy5wdXNoX2JhY2soY29uZmlnY2Fycm9zezUsMTV9KTsKCgkKICAgIGNvdXQ8PCJBY2VkZXIgYSBwb3Npw6fDo28gMDoiPDxjYXJzWzBdLm51bV9jYXI8PCIgIjw8Y2Fyc1swXS50ZW1wb2Rldm9sdGE8PGVuZGw7CiAgICAKICAgIGNvdXQ8PCJNb3N0cmFuZG8gdG9kb3MgY29tIHVtIGZvciI8PGVuZGw7CgoJZm9yIChpbnQgaSA9IDA7IGkgPCBjYXJzLnNpemUoKTsgaSsrKXsKICAgICAgICBjb3V0PDxjYXJzW2ldLm51bV9jYXI8PCIgIjw8Y2Fyc1tpXS50ZW1wb2Rldm9sdGE8PGVuZGw7CiAgICB9CgogICAgcmV0dXJuIDA7Cn0K