Codeforces Round #423 (Div. 2, rated, based on VK Cup Finals), problem: (D) High Load Solution In C/C++

By |2017-07-24T18:04:33+00:00July 24th, 2017|Categories: C/C++, Programming|Tags: , , , , , , , , , |

#include <cstdio> int main(){ int n, k; scanf("%d%d", &n, &k); int l = (n - 2) / k + 1; printf("%d\n", 2 * l - ((n - 1) % k == 1)); for(int i = 2; i <= n; i++) printf("%d %d\n", i, i [...]