Advertisement
mhdew

URI 1983

Nov 29th, 2017
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. #include<stdio.h>
  2.  
  3. int main()
  4. {
  5. int i, n;
  6. long long a[10000000];
  7. int b[100], max;
  8.  
  9. scanf("%d", &n);
  10. for(i=0;i<n;i++){
  11. scanf("%lld", &a[i]);
  12. scanf("%d", &b[i]);
  13. }
  14. max=b[0];
  15.  
  16. for(i=0;i<n;i++){
  17. if(b[i]>max)
  18. max=b[i];
  19. }
  20. if(max>8){
  21. for(i=0;i<n;i++){
  22. if(max==b[i])
  23. printf("%lld\n", a[i]);
  24. }
  25. }
  26. else
  27. printf("Minimum note not reached\n");
  28.  
  29. return 0;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement