#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"; x=dodo(S); if(x==10) return; 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]) S[i]='1'; else S[i]='0'; } else { FOR(x,10) if(hoge[x]!=hoge[x]) S[i]='0'+x; } S[i]='0'; } } int main(int argc,char** argv){ string s;int i; solve(); return 0; }