注:1、检查点二是今天(2014/9/6)出生的,要判零
2、检查点四是没有人符合要求,输出0
#include<bits/stdc++.h>
using namespace std;
int main(){
int n;
cin>>n;
string young;
string old;
int max=0;
int min=10000000;
int count=0;
while(n--){
string temp;
cin>>temp;
int a,b,c;
scanf("%d/%d/%d",&a,&b,&c);
int number = (2014-a)*365+(9-b)*30+(6-c);
if(number>=0&&number<=200*365){
if(number>=max){
old=temp;
max=number;
}
if(number<=min){
young =temp;
min=number;
}
count++;
}
}
if(count){
cout<<count;
if(max!=0)
{
cout<<" "<<old;
}
if(min!=10000000){
cout<<" "<<young;
}
}
else{
cout<<0;
}
return 0;
}