Prajogo Tio
92 followers
92 followers
Posts
Post has attachment
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...
Post has attachment
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...
Post has attachment
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...
Post has attachment
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 .. ...
Post has attachment
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...
Post has attachment
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...
Post has attachment
**
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, ...