#include <iostream>
using namespace std;
const int MAXN = 1e5 + 5;
int n, q, top, s[MAXN];
char ans[MAXN];
int main(int argc, char** argv)
{
cin >> n;
for(int i = 1; i <= n; i++)
{
s[++top] = i;
if(top >= 2)
{
cout << "? " << s[top - 1] << ' ' << s[top] << endl;
string res;
cin >> res;
if(res == "Yes") ans[s[top - 1]] = '(', ans[s[top]] = ')', top -= 2;
}
}
cout << "! ";
for(int i = 1; i <= n; i++)
cout << ans[i];
cout << endl;
return 0;
}剪贴板
剪贴板 mynp95tw
剪贴板信息
剪贴板信息
- 收录
- 更新