Skip to content

Instantly share code, notes, and snippets.

@joaogui1
Created June 7, 2016 00:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joaogui1/365620ea7c42b2a61ad44d39e5d582a3 to your computer and use it in GitHub Desktop.
Save joaogui1/365620ea7c42b2a61ad44d39e5d582a3 to your computer and use it in GitHub Desktop.
#include <bits/stdc++.h>
using namespace std;
int main(){
int n, p, a, b, ans = 0;
scanf("%d %d", &n, &p);
for(int i = 0; i < n; ++i){
scanf("%d %d", &a, &b);
ans += (a + b >= p);
}
printf("%d\n", ans);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment