原题链接
1 4 3 4 4 5 5 6 6 7
>+-+> >+-+> >+-+> >+-+> >+--+> >+--+> >+--+> >+--+> >+--+> >+---+> >+---+> >+---+> >+---+> >+---+> >+---+> >+----+> >+----+> >+----+> >+----+> >+----+> >+----+> >+----+>
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
struct arrows
{
int longs;
int numrous;
} a[51];
int cmp(const void *aa, const void *bb)
{
return (*(arrows *)aa).longs - (*(arrows *)bb).longs;
}
using namespace std;
int main()
{
int cases, times, i, j, k;
cin>>cases;
while (cases--)
{
cin>>times;
for (i=0; i>a[i].longs>>a[i].numrous;
}
qsort(a,times,sizeof(a[0]),cmp);
for (i=0; i+";
for (k=0;k"<