#include #include using namespace std; using namespace atcoder; using ll=long long; using ld=long double; ld pie=3.141592653589793; ll inf=14449999999999999; ll mod=998244353; int main(){ ll a=0,b=0,c=0,d=0; for (ll i = 0; i < 100; i++) { vectora(10,0); for (ll j = 0; j < 10; j++) { cout << j << ' ' << j << ' ' << j << ' ' << j << endl; ll x,y; cin >> x >> y; if (x==4) { return 0; } a[j]=x+y; } vectorb(4); ll now=0; for (ll j = 0; j < 10; j++) { if (a[j]>=1) { b[now]=j; a[j]--; j--; now++; continue; } } vectorc(4); c[0]=0; c[1]=1; c[2]=2; c[3]=3; do { cout << b[c[0]] << ' ' << b[c[1]] << ' ' << b[c[2]] << ' ' << b[c[3]] << endl; ll x,y; cin >> x >> y; if (x==4) { return 0; } } while (next_permutation(c.begin(),c.end())); } }