| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1339355 | athena | Bikeparking (EGOI24_bikeparking) | C++20 | 66 ms | 11264 KiB |
#include <bits/stdc++.h>
using namespace std;
#define int long long int
int32_t main() {
int n;
cin>>n;
int arr[n],brr[n];
for(int i=0;i<n;i++)
cin>>arr[i];
for(int i=0;i<n;i++)
cin>>brr[i];
vector<int>x,y;
for(int i=0;i<n;i++)
{
if(arr[i])
x.push_back(i);//indexes of slot
if(brr[i])
y.push_back(i);//of ppl
}
//everyone MUST get a spot
//try to maximise +1 , go from the back??
//bs???
//say i put every person in the spot before them
int o=y.size()-2;
int uu=max(o,0LL);
cout<<uu<<endl;
}| # | 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... | ||||
