Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- unsigned check(int *Items, int *Count)
- {
- int max = 0, start = 0, end = 0, tick = 0;
- for (; tick < *Count; tick++)
- {
- if (Items[tick] > max)
- {
- max = Items[tick];
- start = end = tick;
- }
- else if (Items[tick] == max)
- {
- end = tick;
- }
- }
- return start == end ? 0 : (((tick + end) - (tick + start)) - 1);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement