Advertisement
Guest User

Untitled

a guest
Oct 16th, 2019
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. import std.stdio;
  2. import std.array;
  3. import std.algorithm;
  4. import std.range;
  5.  
  6. void main() {
  7. int[] arr = [31, 22, -3, 44, 51, 26, 47, 58, 19, 10];
  8. auto res = arr.enumerate.partition!(t => (t[0] & 1) == 1);
  9. writeln(res);
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement