Try these case:
Input:
3 1
2 1
1 2
1 3
3 3
1 1
2 2
3 3
2 1
1 1
2 2
Output:
4
9
4
Search found 2 matches
- Mon Nov 11, 2013 7:48 pm
- Forum: Volume 126 (12600-12699)
- Topic: 12673 - Football
- Replies: 12
- Views: 5729
- Tue Sep 03, 2013 9:02 pm
- Forum: Volume 109 (10900-10999)
- Topic: 10954 - Add All
- Replies: 80
- Views: 41629
Re: 10954 time limit
I just use a vector and at first got TLE.
then i optimize the code and get AC.
But it took 2.8 sec.Probably the worst runtime.

