結果
| 問題 | No.686 Uncertain LIS |
| コンテスト | |
| ユーザー |
vjudge1
|
| 提出日時 | 2026-10-10 17:14:03 |
| 言語 | C++23 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 1,847 bytes |
| 記録 | |
| コンパイル時間 | 2,181 ms |
| コンパイル使用メモリ | 341,592 KB |
| 実行使用メモリ | 9,920 KB |
| 最終ジャッジ日時 | 2026-10-10 17:14:11 |
| 合計ジャッジ時間 | 6,368 ms |
|
ジャッジサーバーID (参考情報) |
judge5_1 / judge4_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 13 WA * 23 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using LL = long long;
using ULL = unsigned long long;
using PII = pair<int, int>;
using PLI = pair<LL, int>;
using PIL = pair<int, LL>;
using PLL = pair<LL, LL>;
string text_yes, text_no;
void set_yes_no_all_lower() {
text_yes = "yes";
text_no = "no";
}
void set_yes_no_all_upper() {
text_yes = "YES";
text_no = "NO";
}
void set_yes_no_first_upper_other_lower() {
text_yes = "Yes";
text_no = "No";
}
void yes() {
cout << text_yes << endl;
}
void no() {
cout << text_no << endl;
}
template <typename T, typename = void>
struct is_iterable : false_type {};
template <typename T>
struct is_iterable<T, void_t<decltype(begin(declval<T&>())), decltype(end(declval<T&>()))>> : true_type {};
template <typename T>
enable_if_t<is_iterable<T>::value && !is_same_v<T, string>, istream&> operator>>(istream& in, T& value) {
for (auto& i : value) {
in >> i;
}
return in;
}
bool solve(int);
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout << fixed << setprecision(10);
set_yes_no_all_lower();
set_yes_no_all_upper();
set_yes_no_first_upper_other_lower();
int T = 1;
// cin >> T;
for (int t = 1; t <= T && solve(t); ++t) {
}
return 0;
}
#define lson (k << 1)
#define rson (k << 1 | 1)
const int mod = 7 + 1e9;
// const int mod = 998244353;
const int dx[] = {1, -1, 0, 0};
const int dy[] = {0, 0, -1, 1};
#if LEMON
const int N = 3 + 256;
#else
#define endl '\n'
const int N = 3 + 5e5;
#endif
bool solve(int case_id) {
int n;
cin >> n;
multiset<int> st;
while (n--) {
int l, r;
cin >> l >> r;
auto it = st.lower_bound(r);
if (it != st.end()) {
st.erase(it);
}
st.insert(l);
}
cout << st.size();
return true;
}
vjudge1