首页 > 代码库 > Codeforces Round #252 (Div. 2) A - Valera and Antique Items

Codeforces Round #252 (Div. 2) A - Valera and Antique Items

水题

#include <iostream>
#include <set>
#include <vector>
#include <algorithm>

using namespace std;

int main(){
    int n,v;
    cin >> n >> v;
    vector<int> res;
    for(int i = 0; i < n; ++ i){
        int k,s;
        bool flag = false;
        cin >> k;
        for(int j  =0 ; j < k; ++j){
            int s;
            cin >> s;
            if(!flag && s < v) res.push_back(i+1),flag = true;
        }
    }
    cout<<res.size()<<endl;
    for(int i = 0 ; i < res.size(); ++ i){
        if(i)cout<<" ";
        cout<<res[i];
    }
    cout<<endl;
}