Submission #741710

#TimeUsernameProblemLanguageResultExecution timeMemory
741710rominanafuFriend (IOI14_friend)C++11
Compilation error
0 ms0 KiB
#include "friend.h" #include <bits/stdc++.h> using namespace std; int findSample(int n, int c[], int host[], int protocol[]) { int max_con = 0; for(int i=0; i<n; i++) { max_con[i] += c[i]; } return max_con; /// return maximum confidence possible }

Compilation message (stderr)

friend.cpp: In function 'int findSample(int, int*, int*, int*)':
friend.cpp:9:16: error: invalid types 'int[int]' for array subscript
    9 |         max_con[i] += c[i];
      |                ^