Last active
February 20, 2016 20:05
-
-
Save ilpropheta/bc6aac96dfea6e63e1b7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
copy_if(adj_it(begin(v)), adj_it(end(v)), ostream_iterator<pair<int, int>>(cout, '\n') [&](const auto& p){ | |
return p.second - p.first == minDiff; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I believe this code doesn't compile (missing comma after
ostream_iterator
and some other minor problems) :)I have tried to make it work but the closest I got was something like