daily pastebin goal
13%
SHARE
TWEET

Untitled

a guest Nov 22nd, 2017 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. int a[];
  2. max1 = 0;
  3. max2 = 0;
  4. for (int i = 0; i < n; ++i)
  5.     if (a[i] > max1) {
  6.         max2 = max1;
  7.         max1 = a[i];
  8.         continue;
  9.     }
  10. if (a[i] > max2)
  11. max2 = a[i];
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top