A - Zikara making friends
Link - KS21_A
Solution - Just iterate over all the friendly values of zikara friend’s and count how many of them are having friendly value strictly greater than zikara’s friendly value.
Code - CodeChef: Practical coding for everyone
B - Trip to Imagica
Link - KS21_B
Solution -
Hint 1 : the number of ways of selecting r items out of n total items is nCr
i.e., nCr = n!/((n-r)!r!)
more optimization can be done ,
n(n-1)(n-2)…(n-r-1) / (n-r!)
Hint 2 : Zikara wants to go imagica with her friends, that means she should select (k-1) of her friends to take to the trip.
Hint 3 : so the ans is nC(k-1) , where n is total no.of friends , k is total number of tickets
Note : since n = 15 , n! croses the range of int , so use long long ;
Code - CodeChef: Practical coding for everyone
C - Zikara and the paid dinner
Link - KS21_C
Solution -
Code - CodeChef: Practical coding for everyone
D - Zikara and the missing number
Link - KS21_D
Solution -
Code - CodeChef: Practical coding for everyone
E - Gamer Zikara
Link - KS21_E
Solution -
Code - CodeChef: Practical coding for everyone
F - Zikara and Roads
Link - KS21_F
Solution -