#include using namespace std; int x,y,a[505][505],val,st=0,dr=199,pivot,i,j; bool u; int main() { ios_base::sync_with_stdio(0); cin.tie(0); srand(time(NULL)); while(st<=dr) { pivot=(st+dr)/2; cout<>val; a[pivot][y]=val; if(!val) return 0; if(val>0) dr=pivot-1; else st=pivot+1; } for(i=0;i<200;++i) for(j=0;j<200;++j) if(a[i][j]<0) x=i; for(i=0;i<=x;++i) { cout<>val; a[i][199]=val; if(!val) return 0; if(val<0) continue; st=0; dr=199; while(st<=dr) { pivot=(st+dr)/2; while(a[i][pivot] && pivot>st) --pivot; if(a[i][st]) break; cout<>val; a[i][pivot]=val; if(!val) return 0; if(val>0) dr=pivot-1; else st=pivot+1; } } return 0; }