카테고리 없음
백준 11053
벤치마킹
2018. 1. 15. 02:15
// 11053 문제
for ( i= 1; i <= N; i++) {
int max = 0;
for (int j = 0; j < i; j++) {
if (a[i] > a[j]){
if (d[j] > max)
max = d[j];
}
}
d[i] = max + 1;
if (ans < d[i])
ans = d[i];
}
printf("%d\n", ans);