## A. 2月29日 (Feb. 29th)

### Description

Given a starting date and an ending date. Count how many Feb. 29th are between the given dates.

### Solution

The easiest way, of course, the brute force, which is quite simple with Python using the `datetime` lib.

However, it's not an effective way for the …

100组数据。

## A. Maximum in Table

Simulation.

```n = int(raw_input())
g = [[1 for i in xrange(n)] for j in xrange(n)]

for i in xrange(1, n):
for j in xrange(1, n):
g[i][j] = g[i - 1][j] + g[i][j - 1]

print g[n - 1][n - 1]
```

## A. Pasha and Pixels

Brute force.

There are multiple ways to form a 2*2 square at one single step. So at every step, we have to check the neighbours of pixel that is colored black.

```#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <vector>

using namespace std;

#define …```

## Introduction

There are a lot of interview problem based on the 1D-array, which is the one of the easiest "data structure".

But the problem about that simple data structure might not be that simple. Here is the summary of the problem about 1D-array.

Of course, most of them come from …

## A. Squats

Trun `x => X` or `X => x` to make the number of 'x' is equal to the number of 'X'.

```n = int(raw_input())
hamsters = [c for c in raw_input()]

sits = hamsters.count('x')
stands = hamsters.count('X')

if sits == stands:
print 0
print ''.join(hamsters)
else:
if sits > stands …```

## Overview

It has been months that I didn't participate in the contest on CF, now I'm back. :)

This round of contest makes me confused that the problem B and C is a little bit too twisted, if you can't catch the vital point, you will get a lot of WAs …

## A. Sereja and Dima

```n = int(raw_input())
pokers = map(int, raw_input().split())

v = [0, 0]
p = 0

for i in xrange(n):
if pokers > pokers[-1]:
v[p] += pokers
del pokers
else:
v[p] += pokers[-1 …```

## 啥？

Tic-tac-toe是我很久之前在CF上做的一道题。非常考细心的模拟题。

## the STATE pattern ## show me the CODE

```class State {
public:
State …```