we are the competitive coding club at brown.
we solve small, exact problems against a clock. for fun. on purpose.
we meet [REDACTED] in [REDACTED].
you do not have to be good at this. you have to be willing to be wrong in front of other people, which is how everyone here got good.
we can be reached at [REDACTED].
the bear is a cube, so the bear is a die. click it and this page rolls again.
we do these, mostly and these, when we want the statement to be four lines long start here if you have never done this or here, which holds your hand a little more we look things up here and here, when we have five terms and no ideas this is the one with the balloonsA. the bear is a cube
time limit: yours · memory limit: yoursthe bear is building a tower. the footprint is 2×2, the tower is n tall, and every brick is 1×1×2. bricks may stand up or lie down. no gaps, nothing sticking out.
how many different towers are there, modulo 998244353? (a rotated tower is a different tower.)
n = 1 → 2 n = 2 → 9 n = 3 → 32
standings · 0:00:00
segment trees
the number 998244353
problems that turn out to be binary search
reading the constraints first
| # | who | = | A | pen |
|---|---|---|---|---|
| 1 | the bear | 1 | + 0:00 | 0 |
| 2 | you | 0 | . | 0 |
Previous Interests
- treaps
- writing a template library instead of practicing
- python (time limit exceeded)
- heavy-light decomposition
- sqrt decomposition (somewhat current)
- geometry (never again)
- suffix automata
- bitsets
- blaming the judge
- link-cut trees (nobody finished)
- the convex hull trick
- rust, briefly
what happens at a meeting?
someone puts up a problem. it gets very quiet. eventually somebody says oh, and then they have to explain it to everyone else, which is the actual skill. then a harder one.is this just leetcode?
it's the next town over. an interview problem asks whether you have seen the trick before. a contest problem asks whether you can invent it in forty minutes, with n up to 2·105 and two teammates watching. after a while the first kind gets very quiet.do i have to use c++?
no. use whatever you like. most people end up there anyway, usually within a week of their first Time limit exceeded.i have never done any of this
good. you have no bad habits. we will lend you ours.why is the bear a cube?
b·c·c·c. also a cube tiles space, and bears, in general, do not.how is this page laid out?
badly, on purpose. every box here was thrown at a random spot and thrown again if it landed on another box. you are looking at layout, one of 4,294,967,296: boxes, rejected throws, ms. keep this one, or roll again.
hints for problem A
- for small n you can simply count. do that first. you will want the numbers.
- cut the tower between two layers. some bricks poke through the cut. there are only 24 ways for that to look.
- so one layer is a 16×16 matrix, n layers is that matrix to the n, and 1018 < 260.
- or stare at the small answers until a three-term recurrence falls out. we won't say which.
read the problem.
read the problem. it was binary search. it is usually binary search. the samples pass. the samples always pass. 108 a second. the rest is commentary. long long. Beware of bugs in the above code; I have only proved it correct, not tried it. — Knuth a dp walks into a bar. it has been here before. there are two kinds of people: those who index from 0, those who index from 1, and