Advertisement
Saleh127

CF 637B

Aug 10th, 2020
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. int main()
  4. {
  5. ios_base::sync_with_stdio(0);
  6. cin.tie(0);cout.tie(0);
  7.  
  8. map<string,bool>aa;
  9. int n,i,j,k,l;
  10. cin>>n;
  11. string a[n+10];
  12. for(i=0;i<n;i++)
  13. {
  14. cin>>a[i];
  15. }
  16. for(i=n-1;i>=0;i--)
  17. {
  18. if(aa[a[i]]!=true)
  19. {
  20. cout<<a[i]<<endl;
  21. aa[a[i]]=true;
  22. }
  23. }
  24.  
  25. return 0;
  26. }
  27.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement