#include <iostream>
#include <tuple>
#include <type_traits>
using namespace std;
template<template<class,class> class F, typename...Ts>
struct Univ;
template<template<class, class> class F, typename T, typename U, typename...Ts>
struct Univ<F, T, U, Ts...>
{
static const int value = F<T, U>::value && Univ<F, U, Ts...>::value;
};
template<template<class, class> class F, typename T>
struct Univ<F, T>
{
static const int value = 1;
};
int main()
{
cout << Univ<is_same,int, int, int>::value;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8dHVwbGU+CiNpbmNsdWRlIDx0eXBlX3RyYWl0cz4KCgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKdGVtcGxhdGU8dGVtcGxhdGU8Y2xhc3MsY2xhc3M+IGNsYXNzIEYsIHR5cGVuYW1lLi4uVHM+CnN0cnVjdCBVbml2OwoKdGVtcGxhdGU8dGVtcGxhdGU8Y2xhc3MsIGNsYXNzPiBjbGFzcyBGLCB0eXBlbmFtZSBULCB0eXBlbmFtZSBVLCB0eXBlbmFtZS4uLlRzPgpzdHJ1Y3QgVW5pdjxGLCBULCBVLCBUcy4uLj4KewoJc3RhdGljIGNvbnN0IGludCB2YWx1ZSA9IEY8VCwgVT46OnZhbHVlICYmIFVuaXY8RiwgVSwgVHMuLi4+Ojp2YWx1ZTsKfTsKCnRlbXBsYXRlPHRlbXBsYXRlPGNsYXNzLCBjbGFzcz4gY2xhc3MgRiwgdHlwZW5hbWUgVD4Kc3RydWN0IFVuaXY8RiwgVD4KewoJc3RhdGljIGNvbnN0IGludCB2YWx1ZSA9IDE7Cn07CgoKaW50IG1haW4oKQp7Cgljb3V0IDw8IFVuaXY8aXNfc2FtZSxpbnQsIGludCwgaW50Pjo6dmFsdWU7IAoKCXJldHVybiAwOwp9