/*
Returns difference in time between a given start hour,
start min and end hour and end min
*/
int difftime(int sh, int sm, int eh, int em)
{
int s, e ;
s = 60*(sh-0) + sm ;
e = 60*(eh-0) + em ;
e -=s ;
if (e < 0)
e += 60 * 24 ;
return e ;
}
Pages
Labels
01 Knapsack
(1)
Ad Hoc
(1)
Backtracking
(1)
Binary Search Tree
(1)
bits
(1)
Brute Force
(1)
codelib
(2)
Data Structures
(1)
Dijkstra
(1)
DP
(2)
Graphs
(1)
Heaps
(1)
Joseph
(1)
Maximum 1-D Sum
(1)
Maximum Contiguous Sum
(1)
Primes
(1)
Priority Queues
(1)
Recursion
(1)
Sieve of Atkins
(1)
UVaOJ Vol-102
(1)
UVaOJ Vol-109
(1)
UVaOJ Vol-5
(1)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment