Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import std.range;
- import std.random;
- import std.stdio;
- int[1000] a;
- void main()
- {
- foreach (ref n; a)
- n = rand()%1000;
- a.sort;
- auto r = assumeSorted(a[]);
- foreach (iter; 0..100_000_000)
- r.canFind(rand()%1000);
- }
Add Comment
Please, Sign In to add comment