# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
226547 | Ruxandra985 | Rope (JOI17_rope) | C++14 | 1297 ms | 96444 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;
int v[1000010] , fii[1000010] , sol[1000010];
int n , m;
vector <int> w[1000010] , now;
pair <int,int> f[1000010] , fi[1000010];
void solve (int caz){
int i , first , curr , idx , x , fmax , maxi , j;
for (i = 1 ; i <= m ; i++)
w[i].clear();
for (i = caz ; i < n ; i += 2 ){
if (v[i] == v[i + 1]){
w[v[i]].push_back(i); /// unde incepe perechea
}
else {
w[v[i]].push_back(i); /// unde incepe perechea
w[v[i + 1]].push_back(i); /// unde incepe perechea
}
}
if (i == n)
w[v[n]].push_back(n);
/// in w, tin pt fiecare culoare, in ce perechi e
Compilation message (stderr)
# | 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... |