#include <iostream>
using namespace std;
// общий код
template <int N, int M> struct Matrix_ {
double arr[N][M];
Matrix_() {
arr[0][0] = 1;
}
};
// Специализация
template <int N, int M> struct Matrix : public Matrix_<N, M> {};
template<>
struct Matrix<4,4> : public Matrix_<4,4> {
Matrix& yoba() {
return (*this);
}
};
int main() {
// your code goes here
Matrix<1,2> m1;
Matrix<4,4> m2;
m2.yoba();
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKLy8g0L7QsdGJ0LjQuSDQutC+0LQKdGVtcGxhdGUgPGludCBOLCBpbnQgTT4gc3RydWN0IE1hdHJpeF8gewoJZG91YmxlIGFycltOXVtNXTsKCU1hdHJpeF8oKSB7CgkJYXJyWzBdWzBdID0gMTsKCX0KCQp9OwoKLy8g0KHQv9C10YbQuNCw0LvQuNC30LDRhtC40Y8KCnRlbXBsYXRlIDxpbnQgTiwgaW50IE0+IHN0cnVjdCBNYXRyaXggOiBwdWJsaWMgTWF0cml4XzxOLCBNPiB7fTsKCnRlbXBsYXRlPD4Kc3RydWN0IE1hdHJpeDw0LDQ+IDogcHVibGljIE1hdHJpeF88NCw0PiB7CglNYXRyaXgmIHlvYmEoKSB7CgkJcmV0dXJuICgqdGhpcyk7Cgl9Cn07CgppbnQgbWFpbigpIHsKCS8vIHlvdXIgY29kZSBnb2VzIGhlcmUKCU1hdHJpeDwxLDI+IG0xOwoJTWF0cml4PDQsND4gbTI7CgltMi55b2JhKCk7CglyZXR1cm4gMDsKfQ==