제출 #1338802

#제출 시각아이디문제언어결과실행 시간메모리
1338802athenaBikeparking (EGOI24_bikeparking)C++20
0 / 100
21 ms5128 KiB
#include <bits/stdc++.h>
using namespace std;
#define int long long int

int32_t main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int n;
    cin>>n;
    int arr[n];
    int brr[n];
    int s=0;
    for(int i=0;i<n;i++){
    cin>>arr[i];s+=arr[i];
}
    for(int i=0;i<n;i++)
    cin>>brr[i];
    //x=1 x=0 y=1 y=0
    //give lower ppl higher places
    //the sum of x is the max possible upvote we can get
//place diagonally???
//what if a place is free which without kicking out 0
if(brr[0]==1)
    cout<<s-1<<endl;
else
    cout<<s<<endl;
    
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...