TOPIC

TLE - Alguém poderia me ajudar nesse código?

Hemili Beatriz Alves Trindade asked 1 year ago

include include include <bits/stdc++.h>

using namespace std; int main(){ int vetor,NC,i,N,h,j; scanf("%d",&NC); for(i=0;i<NC;i++){ scanf("%d",&N); vetor = (int)malloc(N sizeof(int )); for(j=0;j<N;j++){ scanf("%d",&vetor[j]); } sort(vetor,vetor+N); for(h=0;h<N;h++){ printf("%d",vetor[h]); printf("\n"); } free(vetor); } return 0; }

Remember not post solutions. Your post may be reviewed by our moderators.

  • feodorv replied 1 year ago

    Please, see https://www.urionlinejudge.com.br/judge/en/questions/view/1566/4959