Codeforces Round #393 (Div. 2) (8VC Venture Cup 2017 – Final Round Div. 2 Edition), problem: (B) Frodo and pillows Solution in C/C++
#include <stdio.h> int main() { int n, m, k, h, l, r; scanf(“%d %d %d”, &n, &m, &k); l = r = k; h = 1; m -= n; while (m – (r – l …