CCCPaste

Untitled

#include 

using namespace std;

int main() {
    int k, n;
    cin >> k >> n;
    
    int a[n], b[n];
    for(int i = 0; i < n; i++) {
        cin >> a[i];
    }
    for(int i = 0; i < n; i++){
        cin >> b[i];
    }
    
    int res = 0;
    for(int i = 0; i < n; i++) {
        for(int j = 0; j < n; j++) {
            if(a[i] + b[j] >= k) {
                res++;
            }
        }
    }
    cout << res << endl;
    
    
    return 0;
}