# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1048080 | PurpleCrayon | Sprinklers (CEOI24_sprinklers) | C++17 | 160 ms | 6860 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
#define sz(v) int(v.size())
#define ar array
typedef long long ll;
const int N = 1e5+10, MOD = 1e9+7;
const int INF = 2e9+10;
void solve() {
int n, m; cin >> n >> m;
vector<int> a(n); for (auto& x : a) cin >> x;
vector<int> b(m); for (auto& x : b) cin >> x;
vector<string> build(n + 1);
auto can = [&](int x) {
vector<int> dp(n+1);
auto upd = [&](int i, int me, string c) {
if (dp[i] <= me) {
dp[i] = me;
build[i] = c;
}
};
for (int i = 0; i < n; i++) {
// dp[i+1] = max(dp[i+1], dp[i]);
upd(i+1, dp[i], "L");
if (dp[i] >= m) continue;
int need = b[dp[i]];
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |