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