# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
724140 | nasir_bashirov | 메기 농장 (IOI22_fish) | C++17 | 0 ms | 0 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#include "fish.h"
using namespace std;
#define endl '\n'
#define ll long long
#define pii pair<int, int>
#define pll pair<ll, ll>
#define vi vector<int>
#define vl vector<ll>
#define vii vector<pii>
#define vll vector<pll>
#define all(x) x.begin(), x.end()
#define fastio\
ios_base::sync_with_stdio(0);\
cin.tie(0);\
cout.tie(0)\
long long max_weights(int n, int m, vi x, vi y, vi w){
bool flag = true;
for(int i : x){
if(i & 1){
flag = false;
}
}
if(flag){
ll res = 0;
for(int i : w){
res += i;
}
return res;
}
ll s1 = 0, s2 = 0;
for(int i = 0; i < m; i++){
if(x[i] == 0){
s1 += w[i];
}
else{
s2 += w[i];
}
}
return max(s1, s2);
}
int main(){
}