# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1060443 | idas | Comparing Plants (IOI20_plants) | C++17 | 50 ms | 8788 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"
#include "plants.h"
#define FOR(i, begin, end) for(int i=(begin); i<(end); i++)
#define sz(x) ((int)(x).size())
#define pb push_back
#define s second
#define f first
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
const int N=2e5+10;
int n, inc[N][2];
void init(int k, std::vector<int> r) {
n=sz(r);
for(int i=2*n-1; i>=0; i--) {
int j=i%n, nxt=inc[(j+1)%n][0];
if(r[j]==0) {
if(nxt>0) inc[j][0]=nxt+1;
else inc[j][0]=1;
}
else {
if(nxt<0) inc[j][0]=nxt-1;
else inc[j][0]=-1;
}
}
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |