CodeChef is a non-commercial competitive programming community
Login
Username (New User? Signup) Password (Forgot Password?)
Signup
Login or
Signup with
Connect
Note
  • Publicize your achievements on your Facebook Wall.
  • Challenge your friends or ask them for help.

Site Navigation

  • PRACTICE
    • Easy
    • Medium
    • Hard
    • Challenge
    • Peer
  • COMPETE
    • All Contests
    • May Cook-Off
    • May Long 2012
    • April Cook-Off
  • DISCUSS
    • Wiki
    • Forums
    • Blog
    • Facebook
    • Twitter
  • COMMUNITY
    • CodeChef Meetups
    • Campus Chapters
    • Host your Contest
    • User Groups
    • CodeChef TechTalks
    • All Educational Initiatives
    • Event Calendar
  • HELP
    • Frequently Asked Questions
    • FAQ for problem setters
    • Problem Setting
    • Tutorials
    • Long Contest Ranks
    • Short Contest Ranks
  • ABOUT
    • About CodeChef
    • Team CodeChef
    • Press Room
    • CodeChef Financials
    • CodeChef Sponsorships
    • CEO's Corner
    • Contact Us
    • About Directi
Home » Compete » Algothika 2010 » Square It Up

Square It Up

Problem code: AD5

  • All Submissions

All submissions for this problem are available.

A square piece of paper with integer dimensions NxN is placed with a corner at the origin and two of its sides along the x- and y-axes. Then, we cut it up respecting the following rules:

1.We only make straight cuts between two points lying on different sides of the square, and having integer coordinates.

2.Two cuts cannot cross, but several cuts can meet at the same border point.

3.Proceed until no more legal cuts can be made.

Counting any reflections or rotations as distinct, we call C(N) the number of ways to cut an NxN square.

Input

First line contains the number of test cases t(1<=t<=1000) and followed by t lines which contain various values of n(1<=n<=330).

Output

For each value of n, print value of C(n) MOD (10^8)

Example

Input:
2
1
2

Output:
2
30

Explanation
For n=2, answer is 


Date: 2010-02-28
Time limit: 2s
Source limit: 50000
Languages: C C99 strict C++ 4.0.0-8 C++ 4.3.2 PAS gpc PAS fpc JAVA NICE JAR C# C#2 NEM ST ASM D FORT ADA BASH PERL PYTH RUBY LUA ICON PIKE PHP SCM guile SCM qobi LISP sbcl LISP clisp SCALA HASK ERL CAML CLPS PRLG WSPC BF ICK JS


  • Submit

Comments

  • Login or Register to post a comment.

All the participants may post

nirley.gupta @ 4 Mar 2010 07:04 PM

All the participants may post their doubts in the comments section under the Rules and Regulation of this section or mail it to algothika.algochallenge@gmail.com

ALGOTHIKA ORGANIZER

NIRLEY GUPTA

Join us also on

nirley.gupta @ 4 Mar 2010 08:40 PM

Join us also on facebook

ALGOTHIKA

Please post all your doubts

nirley.gupta @ 4 Mar 2010 08:46 PM

Please post all your doubts here or mail it to algothika.algochallenge@gmail.com

ALGOTHIKA ORGANIZER

Nirley Gupta

Are you sure with the time

mcsharma1990 @ 5 Mar 2010 06:46 PM

Are you sure with the time limit?

@Mahesh yes.....

nirley.gupta @ 5 Mar 2010 08:48 PM

@Mahesh

yes.....

@Nirley can u tell the ans

vish @ 9 Mar 2010 12:56 PM

@Nirley

can u tell the ans for n=3

@soc For n=3 answer is 604

nirley.gupta @ 9 Mar 2010 07:06 PM

@soc

For n=3 answer is 604

Looking at the number of

nirley.gupta @ 10 Mar 2010 11:30 PM

Looking at the number of solutions in this problem....

The value of t has been reduced to 20...

so 1<=t<=20............

 

Please make that change.........

Please give me some real

nirley.gupta @ 10 Mar 2010 11:39 PM

Please give me some real solutions for this, as you will be evaluated for the algorithm used.....

can anybody explain the algo

dabbcomputers @ 19 Mar 2010 11:25 PM

can anybody explain the algo behind this problem...???thanx

SUCCESSFUL SUBMISSIONS FOR THIS PROBLEM:

Programming Competition Fetching successful submissions
Directi Go for Gold
CodeChef is a global programming communityCodeChef hosts online programming competitions
CodeChef is a non-commercial competitive programming community
  • About CodeChef
  • About Directi
  • CEO's Corner
  • C-Programming
  • Programming Languages
  • Contact Us
© 2009 Directi Group. All Rights Reserved. CodeChef uses SPOJ © by Sphere Research Labs
In order to report copyright violations of any kind, send in an email to copyright@codechef.com
CodeChef a product of Directi
The time now is:
CodeChef - A Platform for Aspiring Programmers

CodeChef was created as a platform to help programmers make it big in the world of computer programming. At CodeChef we work hard to revive the geek in you by hosting programming contests on a monthly basis. We also aim to have training sessions and events related to online programming for programmers around the world. Apart from providing a platform for programming competitions, CodeChef also has various tutorials and forum discussions to help those who are new to the world of computer programming.

Practice Section - A Place to hone your 'Computer Programming Skills'

Try your hand at one of our many practice problems and submit your solution in a language of your choice. Our judge accepts solutions in over 35+ programming languages. Online programming was never this much fun! Receive points, and move up through the CodeChef ranks. Use our practice section to better prepare yourself for the multiple programming competitions that take place through-out the month on CodeChef.

Compete - Monthly Programming Contests and Cook-offs

Here is where you can show off your computer programming skills. Take part in our 10 day long monthly programming contests and the shorter format Cook-off programming contests. Put yourself up for recognition and win great prizes. Prizes worth up to Rs.20,000 and $700 are up for grabs every month along with lots more CodeChef goodies.

Discuss

Are you new to computer programming? Do you need help with algorithms? Then be part of CodeChefs Forums and interact with all our programmers love helping out other programmers and share their ideas.

CodeChef Community

As part of our Educational initiative, we give institutes the opportunity to associate with CodeChef in the form of Campus Chapters. Hosting online programming competitions is not the only feature on CodeChef. Be a part of the CodeChef community through CodeChef meetups and techtalks. You can also host a programming contest for your institute on CodeChef and be a guest author on our blog.

Domain Name Registration, Web hosting, and Website Design provided by BigRock.com