Thanks Mr. Setter for this quality question

Revision en2, by ArefiX, 2025-03-13 00:59:33

In the last div3 we had the most qualitative question of this century, an iterative problem where you just use rand and hope that God will listen to you. Thanks again.

void solve(){
    ll n; cin>>n;
    ll arr[3]={1,2,3};
    srand(time(0));
    while(true){
        cout<<"? "<<arr[0]<<" "<<arr[1]<<" "<<arr[2]<<endl;
        ll x; cin>>x;
        if(x==0)break;
        arr[rand()%3]=x;
    }
    cout<<"! "<<arr[0]<<" "<<arr[1]<<" "<<arr[2]<<endl;
}
Tags quality question

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English ArefiX 2025-03-13 01:00:47 9 Tiny change: 'ost qualitative question ' -> 'ost qualityful question '
en2 English ArefiX 2025-03-13 00:59:33 8
en1 English ArefiX 2025-03-13 00:58:29 526 Initial revision (published)