結果
| 問題 |
No.2218 Multiple LIS
|
| コンテスト | |
| ユーザー |
vjudge1
|
| 提出日時 | 2025-04-18 16:06:09 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 374 bytes |
| コンパイル時間 | 1,522 ms |
| コンパイル使用メモリ | 160,384 KB |
| 実行使用メモリ | 7,848 KB |
| 最終ジャッジ日時 | 2025-04-18 16:06:15 |
| 合計ジャッジ時間 | 6,067 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 22 WA * 17 |
ソースコード
#include <bits/stdc++.h>
#define int long long
using namespace std;
const int kMaxN = 1e6 + 5;
int n, mx, f[kMaxN];
signed main() {
cin.tie(0)->ios::sync_with_stdio(0);
cin >> n;
for (int i = 1, x; i <= n; i++) {
cin >> x;
for (int j = 1; j * j <= x; j++) {
f[x] = max(f[x], max(f[j], f[x / j]) + 1);
}
mx = max(mx, f[x]);
}
cout << mx;
}
vjudge1