fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. string j;
  6. int x,jm,c=0,mn=1001;
  7. cin>>x;
  8. for (int i=0;i<x;++i) {
  9. cin>>j>>jm;
  10. if (jm==mn)
  11. ++c;
  12. else if (jm<mn) {
  13. c = 1;
  14. mn = jm;
  15. }
  16. }
  17. cout << c << endl;
  18. return 0;
  19. }
Success #stdin #stdout 0s 4380KB
stdin
3
ColdButGold 9
JoyfulElephant 17
AngryFruit 9
stdout
2