Question name - Valid Expression ,of contest no. 78 div 4.

#include <bits/stdc++.h>

using namespace std;

int main() {

int t;

cin>>t;

while(t–){

int n,x,d=1;

string s="";

cin>>n>>x;

if(x>0){

for(int i=0;i<n;i++){

if(d<x){

s=s+ “+”;

d++;

}

else if(d==x)

s=s+"*";
}
if(s=="")
cout<<- 1<<endl;
else
cout<<s<<endl;
}
else{
for(int i=0;i<n;i++){
if(d<x){
s=s+"-";
d–;
}
else if(d==x){
s=s+"*";

}

}

if(s=="")

cout<<-1<<endl;

else

cout<<s<<endl;

}

}

return 0;

}