#include<bits/stdc++.h> using namespace std; int main(){ int n; while(scanf("%d",&n)!=EOF &&n!= 0){ string t[1005],fin[1005],tmp; int num = 0; for(int i = 0;i<n;i++)cin>>t[i]; for(int i = 0;i<n;i++){ tmp = t[i]; for(int j = 0;j < n;j++){ if(tmp+".exe" == t[j]){ fin[num++] = t[j]; } } } sort(fin,fin+num); for(int i = 0;i<num;i++)cout<<fin[i]<<endl; } return 0; } |
Double click to view unformatted code.