Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <vector>
- #include <algorithm>
- using namespace std;
- int main() {
- vector<vector<int>> v = {{0, 1, 2},
- {},
- {0}};
- auto count = count_if(
- begin(v), end(v),
- [](const vector<int>& s) {
- return s.size() > 0;
- }
- );
- cout << count << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement