Problem cny
User zyq69
Submission Time 2023-11-24 20:28:19
Score 0
Max Time N/A
Max Memory N/A

Compile Error

cny.cpp:2:7: error: expected nested-name-specifier before ‘namsepace’
2 | using namsepace std;
| ^~~~~~~~~
cny.cpp:6:1: error: ‘vector’ does not name a type
6 | vector<int> v;
| ^~~~~~
cny.cpp: In function ‘int32_t main()’:
cny.cpp:11:2: error: ‘cin’ was not declared in this scope; did you mean ‘std::cin’?
11 | cin >> N >> K;
| ^~~
| std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:75,
from cny.cpp:1:
/usr/include/c++/9/iostream:60:18: note: ‘std::cin’ declared here
60 | extern istream cin; /// Linked to standard input
| ^~~
cny.cpp:15:4: error: ‘v’ was not declared in this scope
15 | v.push_back(inp);
| ^
cny.cpp:19:10: error: ‘v’ was not declared in this scope
19 | if((int)v.size() <= K) cout << sum;
| ^
cny.cpp:19:25: error: ‘cout’ was no