Problem | sumint |
---|---|
User | meixu |
Submission Time | 2023-02-17 17:19:06 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
sumint.cpp: In function ‘int main()’:
sumint.cpp:7:5: error: ‘vector’ was not declared in this scope
7 | vector<int> l(d+1, 0);
| ^~~~~~
sumint.cpp:2:1: note: ‘std::vector’ is defined in header ‘<vector>’; did you forget to ‘#include <vector>’?
1 | #include<iostream>
+++ |+#include <vector>
2 | using namespace std;
sumint.cpp:7:12: error: expected primary-expression before ‘int’
7 | vector<int> l(d+1, 0);
| ^~~
sumint.cpp:11:9: error: ‘l’ was not declared in this scope
11 | l[i] = a;
| ^
sumint.cpp:13:24: error: ‘l’ was not declared in this scope
13 | cout << accumulate(l.begin(), l.end(), 0) << endl;
| ^
sumint.cpp:13:13: error: ‘accumulate’ was not declared in this scope
13 | cout << accumulate(l.begin(), l.end(), 0) << endl;
| ^~~~