Diff
Not logged in

Differences From Artifact [ae16b2462960bb78]:

To Artifact [feb5fdb1e50b8e31]:


8 : N1(N1), N2(N2), data(N1*N2, t) { assert(data.size()*sizeof(T)< 8 : N1(N1), N2(N2), data(N1*N2, t) { assert(data.size()*sizeof(T)< 9 T& operator()(int i1, int i2) 9 T& operator()(int i1, int i2) 10 { return data[ (i1*N2)+i2 ]; } 10 { return data[ (i1*N2)+i2 ]; } 11 void swap(DP2& rhs) 11 void swap(DP2& rhs) 12 { data.swap(rhs.data); } 12 { data.swap(rhs.data); } 13 }; 13 }; 14 14 15 // Tested: Codeforces #13 C | 15 // Tested: Codeforces #13 C, SRM 528 Lv2 16 template<typename T> 16 template<typename T> 17 struct DP2x 17 struct DP2x 18 { 18 { 19 const int N1, N2; 19 const int N1, N2; 20 vector<T> data; 20 vector<T> data; 21 DP2x(int, int N2, const T& t = T()) 21 DP2x(int, int N2, const T& t = T()) 22 : N1(2), N2(N2), data(N1*N2, t) { assert(data.size()*sizeof(T)<( 22 : N1(2), N2(N2), data(N1*N2, t) { assert(data.size()*sizeof(T)<(