#include<bits/stdc++.h> using namespace std; int main(){ int n; while(scanf("%d",&n)!=EOF){ if(n==0) break; string s; vector <string> op; for(int i=0;i<n;i++){ cin>>s; op.push_back(s); } sort(op.begin(),op.end()); for(int j=0;j<op.size()-1;j++){ if(op[j]+".exe"==op[j+1]) cout<<op[j+1]<<endl; } op.clear(); } return 0; } |
Double click to view unformatted code.