Submission #791400

#TimeUsernameProblemLanguageResultExecution timeMemory
791400adaawfFeast (NOI19_feast)C++14
Compilation error
0 ms0 KiB
#include <iostream>
using namespace std;
long long int a[1000005];
int main() {
    long long int n, k;
    cin >> n >> k;
    for (int i = 1; i <= n; i++) {
        cin >> a[i];
        c += a[i];
    }
    cout << c;
}

Compilation message (stderr)

feast.cpp: In function 'int main()':
feast.cpp:9:9: error: 'c' was not declared in this scope
    9 |         c += a[i];
      |         ^
feast.cpp:11:13: error: 'c' was not declared in this scope
   11 |     cout << c;
      |             ^