#include using namespace std; using Int=long long; using Real=long double; templateinline bool chmin(T&A,S B){if(A>B){A=B;return true;}else{return false;}} templateinline bool chmax(T&A,S B){if(A>a>>b>>c; int x=a=='?'?0:b=='?'?1:2; (x==0?a:x==1?b:c)='1'; if(isKadomatsuretsu(a,b,c))ans+='1'; (x==0?a:x==1?b:c)='4'; if(isKadomatsuretsu(a,b,c))ans+='4'; cout<>T; while(T--)sol(); }