Simplify min+max
This commit is contained in:
parent
38d2ca1d66
commit
6063b65fda
1 changed files with 2 additions and 10 deletions
12
main.cpp
12
main.cpp
|
@ -19,16 +19,8 @@ struct position {
|
||||||
};
|
};
|
||||||
|
|
||||||
// Utilities
|
// Utilities
|
||||||
count_type min(count_type a, count_type b) {
|
count_type min(count_type a, count_type b) { return (a <= b) ? a : b; }
|
||||||
if(a <= b)
|
count_type max(count_type a, count_type b) { return (a >= b) ? a : b; }
|
||||||
return a;
|
|
||||||
return b;
|
|
||||||
}
|
|
||||||
count_type max(count_type a, count_type b) {
|
|
||||||
if(a >= b)
|
|
||||||
return a;
|
|
||||||
return b;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Global variables
|
// Global variables
|
||||||
treap file;
|
treap file;
|
||||||
|
|
Loading…
Reference in a new issue