Advertisement
cosenza987

Untitled

Oct 1st, 2021
1,181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.02 KB | None | 0 0
  1. // Problem: A. Spiciest Snek
  2. // Contest: Codeforces - UTPC Contest 02-05-21 Div. 2 (Beginner)
  3. // Memory Limit: 256 MB
  4. // Time Limit: 1000 ms
  5. // Date / Time: 2021-10-01 17:57:34
  6. // Author: cosenza
  7. // всё что ни делается - всё к лучшему
  8. // check list -> long long, special cases, array size, mod (a*b%p*c%p not a*b*c%p  ,  (a-b+p)%p not a-b )
  9. //
  10. // Powered by CP Editor (https://cpeditor.org)
  11.  
  12. //#pragma GCC optimize("Ofast")
  13. //#pragma GCC optimize ("unroll-loops")
  14. //#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
  15. //THESE ARE LAST DITCH EFFORTS!!!
  16.  
  17. #include <bits/stdc++.h>
  18.  
  19. using namespace std;
  20.  
  21. int main() {
  22.     ios_base::sync_with_stdio(false);
  23.     cin.tie(0);
  24.     int n;
  25.     cin >> n;
  26.     double cur = 11;
  27.     string ans;
  28.     while(n--) {
  29.         string a;
  30.         double prob;
  31.         cin >> a;
  32.         cin >> prob;
  33.         if(prob < cur) {
  34.             ans = a;
  35.             cur = prob;
  36.         }
  37.     }
  38.     cout << ans << "\n";
  39.     return 0;
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement