Suhendry’s Blog

When in doubt, do math ;-)

UVA 11486 - Finding Paths in Grid

without comments

UVA 11486 - Finding Paths in Grid

Given a grid of N rows and 7 columns. Initially there are 4 players in the first row (the column location will be given as input). A player can only move diagonally to the next row. For example, a player in row-3 column-4 or (3, 4) has two valid moves: (4, 3) and (4,5). But the player in (3, 1) has only one valid move, which is (4,2). Each cell can be visited by at most one player.

Count in how many ways all of the players can reach row N (1 ≤ N ≤ 1000000000) and mod the output by 1000000007.

Read the rest of this entry »

Written by suhendry

January 6th, 2009 at 9:36 pm

Posted in Algorithm, UVA

BNPC HS 2008 - Problem Set & Analysis

with 2 comments

Bina Nusantara Programming Contest for High School Students (BNPCHS) 2008

Problemset bisa didownload di sini:
BNPCHS 2008 - Problem Set (PDF - 366KB)

Test Data bisa didownload di sini:
BNPCHS 2008 - Test Data (ZIP - 2135KB)

Pembahasan solusi bisa dilihat di sini:

Pages: 1 2 3 4 5 6 7 8 9

Written by suhendry

December 17th, 2008 at 2:55 pm

Posted in Algorithm, Event

ZJU 3060 - Evil Game

with 5 comments

ZJU 3060 - Evil Game

You are given an M * N grids (1 <= M, N <= 100). You start from the most left-top cell (0, 0) and want to get to the most right-bottom cell (M-1, N-1). At any time, you can only move to left, right or down. Each cell (mij) contains an integer between -100 and 100 (inclusive) denoting the value that you will received when you visit the corresponding cell, in such manners:

  • mij = mij for the first visit to cell (i, j)
  • mij = -|mij| for each next visit to cell (i, j)

Calculate the maximum value that can be achieved to reach cell (M-1, N-1)!

Read the rest of this entry »

Written by suhendry

November 25th, 2008 at 6:41 pm

Posted in ZJU

ACM-ICPC 2008 Jakarta - Problem Set & Analysis

with 12 comments

Well… I was FORCED by Felix Halim to write this review! Every time I went online in my YM, he bugged me and kept asking about the blog. Argghhh! He sure has the talent to be a debt collector :-) ! Now suddenly I feel to write my blog in English! Yes, English! Err.. maybe it will be more Inglish than English. No complain, no protest, no typo-report, no grammar-report! Just read, leave comment or discuss the problems >:)

You can download the problemset here:
ACM-ICPC 2008 Jakarta - Problem Set (634 KB)

REALLY THANKS to all the authors team: Andrian Kurniady, Andoko Chandra, Evan Leonardi, Felix Halim, Ilham Winata Kurnia and Ryan Leonel Somali; who have helped me to prepare all the problemset, solutions and test-data for this contest. And also for Timotius Sakti who have coded Java solution for some problems.

Pages: 1 2 3 4 5 6 7 8 9 10 11

Written by suhendry

November 19th, 2008 at 6:01 pm

Posted in Algorithm, Event

ACM-ICPC 2008 Jakarta (20-21 Oct)

with 18 comments

Ini adalah post mengenai cerita sebulan yang lalu. Tadinya udah males diupload dan berencana dibatalin, tapi belakangan ada orang rese nanyain melulu, jadi akhirnya gw upload aja deh meskipun belum kumplit, hehe…



Ho yeah!! akhirnya gw kembali punya waktu buat nulis blog (belakangan nulis blog cuma pas ada kontes… kasian amat). anyway, sebulan terakhir ini gw bener-bener disibukkan oleh event yang konon paling bergengsi (karena lepel internasional) yang pernah diselenggarakan oleh BINUS, The ACM-ICPC 2008 Jakarta Site. Seperti biasa, kesibukan gw ini sama sekali gak berkaitan dengan bagian acara, tapi dengan problemset dan sistem lombanya. Bahkan gw tahu susunan acaranya baru pas hari H (20-Okt), padahal beberapa hari sebelumnya gw udah dapat forwardan email susunan acara dari panitia lain (gak dibuka sih…) :p

Read the rest of this entry »

Written by suhendry

November 19th, 2008 at 5:44 pm

Posted in Event