Migliorare poldo 35/100

Come migliorare ho 35/100 ?

#include <iostream>
#include <stdlib.h>
using namespace std;
int main()
{int soluzioni[100]={0}, i, j;
int panini[100]={0};
freopen ("input.txt","r",stdin);
freopen("output.txt","w",stdout);
int numeroPanini,max;
cin>>numeroPanini; 
for (i=0;i<numeroPanini;i++)
cin>>panini[i]; 
for (i=numeroPanini-1;i>=0;i--) 
{max=0; 
for (j=numeroPanini-1;j>i;j--) 
{
if (panini[i] > panini[j] && soluzioni[j]>max) max=soluzioni[j];
}
soluzioni[i] = max + 1;
}
max=soluzioni[0];
for (i=1; i< numeroPanini;i++)
if (soluzioni[i] > max )max = soluzioni[i];
cout<<max;
return 0;
}

N può arrivare fino a 10000.
Sostituisci 100 con 10000 e otterrai 100/100.

OK grazie :heart::heart::heart::heart::heart::heart::heart::heart::heart::heart::heart: