study-cpp/ssoier/1281/1281_remade.cpp

30 lines
608 B
C++
Raw Permalink Normal View History

2024-07-09 14:29:33 +08:00
// ID:1281 TITLE:最大上升子序列
#include <iostream>
int main()
{
int length;
std::cin >> length;
int v[length], v_size = length - 1;
int result[100][length], result_num = 0;
for (int i = 0; i < length; i++)
{
int input_element;
std::cin >> input_element;
v[i] = input_element;
}
{
bool flag = true;
int prev = 0;
while (v_size != 0)
{
if (v[v_size] > prev)
{
prev = v[v_size];
v_size--;
result[result_num][]
}
}
}
}