Paste: A
Author: | churehill |
Mode: | factor |
Date: | Sat, 30 Aug 2014 07:45:11 |
Plain Text |
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <string>
#include <vector>
#include <queue>
#include <stack>
#include <algorithm>
#include <climits>
using namespace std;
typedef long long LL;
int x[200],y[200];
int main()
{
int n,s;
cin>>n>>s;
for(int i=0;i<n;i++)
cin>>x[i]>>y[i];
s *= 100;
int ans = -1;
for(int i=0;i<n;i++) {
if(s>=x[i]*100+y[i]) {
int temp = (s - x[i]*100-y[i])%100;
if(temp > ans) ans = temp;
}
}
cout<<ans;
}
New Annotation