Submission #625980

#TimeUsernameProblemLanguageResultExecution timeMemory
625980sword060Catfish Farm (IOI22_fish)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "fish.h" using namespace std; long long max_weights(int x,int k,vector<int> a,vector<int> b,vector<int> c){ long long p[5]; for(int i=0;i<4;i++)p[i]=0;  for(int i=0;i<k;i++)p[b[i]&1]+=c[i]; return max(p[0],p[1]); }

Compilation message (stderr)

fish.cpp:7:2: error: extended character   is not valid in an identifier
    7 |   for(int i=0;i<k;i++)p[b[i]&1]+=c[i];
      |  ^
fish.cpp: In function 'long long int max_weights(int, int, std::vector<int>, std::vector<int>, std::vector<int>)':
fish.cpp:7:8: error: expected primary-expression before 'int'
    7 |   for(int i=0;i<k;i++)p[b[i]&1]+=c[i];
      |       ^~~
fish.cpp:7:16: error: 'i' was not declared in this scope
    7 |   for(int i=0;i<k;i++)p[b[i]&1]+=c[i];
      |               ^