#include using namespace std; typedef signed long long ll; #undef _P #define _P(...) (void)printf(__VA_ARGS__) #define FOR(x,to) for(x=0;x>a>>s; return a; } int best[10]; void solve() { int i,j,k,l,r,x,y; string s; string S="0000000000"; string R="0000000000"; FOR(i,10) { int hoge[10]={}; FOR(x,10) { S[i]='0'+x; hoge[x]=dodo(S); if(hoge[x]==10) return; } if(hoge[0]!=hoge[1]) { if(hoge[0]==hoge[2]) R[i]='1'; else R[i]='0'; } else { FOR(x,10) if(hoge[x]!=hoge[0]) R[i]='0'+x; } S[i]='0'; } cout<