## OCTOBER LONG CHALLENGE SOLUTIONS 2020

OCTOBER LONG CHALLENGE SOLUTIONS 2020 Solutions for October Long Challenge will be posted after the contest till then we will help you guys with the logic building, Previously we have done the same thing this time too we will help you guys with the logic. link ESET FREE LINCENSE KEYS UPDATED 2020 : https://www.cybergeeksquad.co/2020/11/eset-free-lincense-keys-updated-2020.html Chegg FREE Premium Accounts: Free … Read more

## Rooted Minimum Spanning Tree SOLUTIONS ROOTMST

Rooted Minimum Spanning Tree SOLUTION OCTOBER CHALLENGE 2020 You are given a weighted simple undirected graph, vertex 1 is not an articulation point and connected to all other vertices. For each K∈{1,2,…,N−1} you need to find the smallest weight of the spanning tree where the degree of vertex 1 is equal to K. Input: The … Read more

## Inversions SOLUTIONS INVSMOD2 OCOTBER CHALLENGE

Inversions SOLUTION OCOTBER CHALLENGE 2020 You are given two positive integers N,K, where K≤N. Your goal is to find the number of permutations of N elements with exactly K inversions. As the answer may be very large, you only need to find it modulo 2. Input: The first line contains one integer T, the number … Read more

Adding Squares SOLUTIONS OCTOBER CHALLENGER 2020 There are N different vertical lines on the plane, i-th of which is defined by the equation x=ai (0≤ai≤W) and M different horizontal lines, i-th of which is defined by the equation y=bi (0≤bi≤H). You must add one line of the form y=k (0≤k≤H, k≠bi for every 1≤i≤M) to … Read more

## Compress all Subsegments SOLUTIONS SEGCOMPR

Compress all Subsegments SOLUTIONS OCTOBER CHALLENGE 2020 For the array B, while it has more than one element, you can choose arbitrary two elements x,y (they may be the same, but they should have different indices) delete them, and add an element g(x,y) instead. Where g(x,y) denotes the highest bit in x⊕y, or 0 if … Read more

## D-Dimensional MST SOLUTIONS DDIMMST

D-Dimensional MST SOLUTIONS OCTOBER CHALLENGE 2020 You are given N points in D-dimensional space.   Each point is given by D coordinates xi,1,xi,2,…,xi,D.   Weight of an edge between points i and j is |xi,1−xj,1|+|xi,2−xj,2|+…+|xi,D−xj,D|.   Find the weight of the maximum spanning tree.   Input: The first line contains two integers N,D. Each of … Read more

## Random Knapsack SOLUTIONS RANDKNAP

Random Knapsack SOLUTIONS OCTOBER CHALLENGE 2020 You are given N=240 integers, randomly generated in [0;998244353).   You need to answer Q queries, in each query, you are given one integer X, 0≤X<998244353. And you need to find the subset of given integers with sum X, modulo 998244353.   For each test case, it is guaranteed … Read more

## Village Road Network SOLUTIONS VILLNET

Village Road Network SOLUTIONS OCTOBER CHALLENGE 2020 In the nation of Chefland there are villages at co-ordinates (x,y) whenever x and y are non-zero odd co-prime integers. x can be either positive or negative, but y is always positive.   In each village (x,y) there is a crossroads, with the roads marked North, South, East, … Read more

## Replace for X SOLUTIONS REPLESX

Replace for X SOLUTIONS OCTOBER CHALLENGE 2020 You are given an array of N integers A1,A2,…,AN and three more integers X,p, and k. An operation on the array is defined to be: replace the k-th smallest integer in the array with any integer you want. Output the minimum number of operations you must perform on … Read more

## Positive AND SOLUTIONS POSAND

Positive AND SOLUTIONS POSAND OCTOBER CHALLENGE 2020 A permutation p1,p2…pN of {1,2,…,N} is beautiful if pi&pi+1 is greater than 0 for every 1≤i<N . You are given an integer N, and your task is to construct a beautiful permutation of length N or determine that it’s impossible. Note that a&b denotes the bitwise AND of … Read more

error: Content is protected !!
+