Advertisement
Josif_tepe

Untitled

Dec 4th, 2022
713
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.52 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5.  
  6. int main() {
  7.     int n;
  8.     cin >> n;
  9.    
  10.     string iminja[n];
  11.    
  12.     int visina[n];
  13.    
  14.     for(int i = 0; i < n; i++) {
  15.         cin >> iminja[i];
  16.         cin >> visina[i];
  17.     }
  18.     int barana_visina;
  19.     cin >> barana_visina;
  20.    
  21.     for(int i = 0; i < n; i++) {
  22.         if(barana_visina == visina[i]) {
  23.             cout << iminja[i] << endl;
  24.         }
  25.     }
  26.    
  27.    
  28.     return 0;
  29. }
  30. /*
  31.  3
  32.  josif 185
  33.  blagoja 193
  34.  petar 165
  35.  
  36.  
  37.  
  38.  
  39.  **/
  40.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement