# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1112880 | ntdaccode | Line Town (CCO23_day1problem3) | C++17 | 1 ms | 336 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>
#define fori(i,a,b) for(int i=a;i<=b;i++)
#define int long long
#define pb push_back
using namespace std;
typedef pair<int,int> ii;
typedef tuple<int,int,int> tp;
const int M=1e6+10;
const int N=5e5+10;
const int mod=1e9+7;
int n,f[N],a[N],b[N],g[N];
void sub1()
{
int kq = 1e9;
for(int pos = 0;pos <= n; pos++) {
for(int i = 1;i <= n; i++) b[i] = a[i];
bool ok = 0;
int res = 0;
//
for(int i = 1;i <= pos ; i++) {
if(b[i] == 1) {
if(b[i + 1] == 1 && i != pos) i++,res++;
else ok = 1;
}
}
for(int i = pos + 1;i <= n;i++) {
if(b[i] == -1) {
if(b[i + 1] == -1 && i != n) i++,res++;
else ok = 1;
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |