# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
736635 | Olympia | Zoltan (COCI16_zoltan) | C++14 | 1090 ms | 5200 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <iostream>
#include <set>
#include <cmath>
#include <queue>
#include <vector>
#include <cstdlib>
#include <ctime>
#include <cmath>
#include <algorithm>
#include <cassert>
#include <map>
#include <deque>
using namespace std;
pair<int,int> lis (vector<int> v) {
vector<int> lis_length(v.size()); //lis_length[i] is the length of the longest increasing subsequence ending at index i.
vector<int> lis_number(v.size()); //lis_number[i] is the number of longest increasing subsequences ending at index i.
lis_length[0] = 1, lis_number[0] = 1;
for (int i = 1; i < v.size(); i++) {
lis_length[i] = 1, lis_number[i] = 1;
for (int j = 0; j < i; j++) {
if (v[j] < v[i]) {
if (lis_length[j] + 1 > lis_length[i]) {
lis_length[i] = lis_length[j] + 1;
lis_number[i] = lis_number[j];
} else if (lis_length[j] + 1 == lis_length[i]) {
lis_number[i] += lis_number[j];
}
}
}
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |