language: C++11 (gcc-4.7.2)
date: 559 days 8 hours ago
link:
visibility: public
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include <iostream>
using namespace std;
 
#include <unordered_map>
 
using namespace std;
 
class Array;
 
typedef pair<int, int> Point;
 
template <typename A> 
struct MyHash
{
   size_t operator()(const Point & p) const 
   {
     return p.second * A::C + p.first;
   }
};
 
class Array {
public:
    typedef unordered_map<Point, Array, MyHash<Array> > Map;
    static const int R = 5, C = 5;
    Map compute() {/*...*/}
};
 
int main() {
}