daily pastebin goal
5%
SHARE
TWEET

Untitled

a guest Dec 17th, 2018 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // c#
  2. int[,] m = new int[w, h];
  3. // fill matrix m
  4. for (int i = 0; i < 2 * (w + h - 2); ++i)
  5. {
  6.     int e = i < w - 1 ? m[i, 0]
  7.           : i < w + h - 2 ? m[w - 1, i - w + 1]
  8.           : i < 2 * w + h - 3 ? m[2 * w + h - 3 - i, h - 1]
  9.           : m[0, 2 * (w + h - 2) - i];
  10.     // do something with element e
  11. }
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