fork download
  1. #include <iostream>
  2. #include <vector>
  3. using namespace std;
  4.  
  5. int main() {
  6.  
  7. vector <int> Obiekty;
  8. Obiekty.resize(3);
  9. Obiekty[20] = 1;
  10. Obiekty[30] = 4;
  11. Obiekty[40] = 3;
  12. for(int i =2;i<=4;i++)
  13. {
  14. cout<<Obiekty[i*10]<<endl;
  15.  
  16. }
  17. }
Success #stdin #stdout 0s 3028KB
stdin
stdout
1
4
3