Posts

Post has attachment

Public

**Codeforces Round #416 (Div. 2) C. Vladik and Memorable Trip**

Problem Statement: Codeforces Round #416 (Div. 2) C. Vladik and Memorable Trip Summary: An integer array A of size n <= 5000 has entries which ranges from 1 to 5000. We pick disjoint segments of the array such that for each segment S: 1. If i in S, then any...

Add a comment...

Post has attachment

Public

**Codeforces Round #416 (Div. 2) E. Vladik and Entertaining Flags**

Problem Statement: Codeforces Round #416 (Div. 2) E. Vladik and Entertaining Flags Summary: Given an integer matrix with size m x n with m <= 10, n <= 10^5, find the number of connected components in segment [l, r] of the matrix (i.e. rectangle (0, l) -> (m...

Add a comment...

Post has attachment

Public

**Codeforces Round #415 (Div. 2) E. Find a car [or Div. 1 C]**

Problem Statement: Codeforces Round #415 (Div. 2) E. Find a car Paraphrase: An integer matrix M is defined as: M[i][j] = the minimum integer x >= 1 such that: - M[i][k] != x for all k < j - M[k][j] != x for all k < i Example: 1 2 3 4 2 1 4 3 3 4 1 2 4 3 2 1...

Add a comment...

Post has attachment

Public

**UVa 434 - Matty's Blocks**

Problem Statement: UVa 434 - Matty's Blocks Summary: This problem pertains to a matrix of size K x K, where each entry is a non-negative integer. Let the maximum values on each row be max_row[0 .. K-1], and the maximum values on each column be max_col[0 .. ...

Add a comment...

Post has attachment

Public

**a bit of algo: LZW Compression**

LZW compression is a magic show. I am left awe-struck as the algorithm compresses and uncompresses bits of data. The magic is not in the fact that it does compress the data, no, that's the boring part. The magic is in the simplicity and elegance of it. Comp...

Add a comment...

Post has attachment

Public

**Codeforces Round #365 (Div. 2) - E. Mishka and Divisors**

Problem Statement: http://codeforces.com/contest/703/problem/E Summary: Given an array of n <= 1000 integers a[i] <= 10^12, and an integer k <= 10^12. Find subset of the array which product of the elements is divisible by k, such that the size of the subset...

Add a comment...

Post has attachment

Public

**

Problem Statement: http://codeforces.com/contest/703/problem/D Summary: Given array a[i] for N <= 10^6 integers, and M <= 10^6 queries (L, R): collect all integers in a[L..R] that occur even number of times, and compute their XOR. E.g. for a = {1, 2, 2, 3, ...

Problem Statement: http://codeforces.com/contest/703/problem/D Summary: Given array a[i] for N <= 10^6 integers, and M <= 10^6 queries (L, R): collect all integers in a[L..R] that occur even number of times, and compute their XOR. E.g. for a = {1, 2, 2, 3, ...

Add a comment...

Post has attachment

Public

**Codeforces Round #366 (Div. 1) - B. Ant Man**

Problem Statement: http://codeforces.com/contest/704/problem/B Summary: We are given a graph with nodes 1 to n, such that the cost of going from node i to node j is: 1) |x[i] - x[j]| + c[i] + b[j] if j < i 2) |x[i] - x[j]| + d[i] + a[j] if i < j. Given a st...

Add a comment...

Post has attachment

Public

**Kalman Filter - Preliminary Study**

I am embarking on a project that works with sensors. Sensor readings are noisy, so they need to be filtered. There are many ways to filter a stream of noisy data, and one that I just learnt is called Kalman Filter. A good place to learn about it is: http:/...

Add a comment...

Post has attachment

Public

**Codeforces Round #253 (Div. 1) - A. Borya and Hanabi [Revisited]**

Problem Statement: http://codeforces.com/contest/442/problem/A Summary: A deck of cards, each card has a name (R, G, B, Y, W) and a value (1, 2, 3, 4, 5). Given an array of cards of unknown names and values, we can ask for hints to identify each of the card...

Add a comment...

Wait while more posts are being loaded