QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#749736 | #7694. Cornhusker | alexhamidi | Compile Error | / | / | C++14 | 439b | 2024-11-15 09:47:29 | 2024-11-15 09:47:30 |
Judging History
answer
#include <iostream>
using namespace std;
int main() {
vector<int> A(5);
vector<int> L(5);
for (int i = 0; i < 5; i++) {
cin >> A[i] >> L[i];
}
int n, KWF;
cin >> n >> KWF;
int nk = 0;
for (int i = 0; i < 5; i++) {
nk += A[i] * L[i];
}
int ak = nk/5;
int nkt = ak * n;
int ans = nkt/KWF;
cout << ans;
return 0;
}
/*
*/
Details
answer.code: In function ‘int main()’: answer.code:6:5: error: ‘vector’ was not declared in this scope 6 | vector<int> A(5); | ^~~~~~ answer.code: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; answer.code:6:12: error: expected primary-expression before ‘int’ 6 | vector<int> A(5); | ^~~ answer.code:7:12: error: expected primary-expression before ‘int’ 7 | vector<int> L(5); | ^~~ answer.code:10:16: error: ‘A’ was not declared in this scope 10 | cin >> A[i] >> L[i]; | ^ answer.code:10:24: error: ‘L’ was not declared in this scope 10 | cin >> A[i] >> L[i]; | ^ answer.code:19:15: error: ‘A’ was not declared in this scope 19 | nk += A[i] * L[i]; | ^ answer.code:19:22: error: ‘L’ was not declared in this scope 19 | nk += A[i] * L[i]; | ^