OJ-Problems-Source/HDOJ/2550_autoAC.cpp
2016-08-22 00:30:27 +08:00

36 lines
756 B
C++

#include<iostream>
#include<map>
using namespace std;
int main()
{
int t;
while(cin>>t)
{
while(t--)
{
int n;
cin>>n;
map<int,int> m;
while(n--)
{
int a,b;
cin>>a>>b;
m.insert({a,b});
}
auto b=m.cbegin();
for(;b!=m.cend();++b)
{
for(int i=0;i!=b->second;++i)
{
cout<<">+";
for(int j=0;j!=b->first-2;++j)
cout<<"-";
cout<<"+>\n";
}
cout<<endl;
}
}
}
return 0;
}