Created
August 8, 2014 03:57
-
-
Save NonWhite/d3c79651d3697a85fb5a to your computer and use it in GitHub Desktop.
Andy's First Dictionary
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <sstream> | |
| #include <bitset> | |
| #include <cstdio> | |
| #include <string> | |
| #include <cstring> | |
| #include <vector> | |
| #include <queue> | |
| #include <stack> | |
| #include <set> | |
| #include <map> | |
| #include <algorithm> | |
| #include <cmath> | |
| #include <cstdlib> | |
| #include <cctype> | |
| #include <numeric> | |
| #include <list> | |
| #define FOR(i,A) for(typeof (A).begin() i = (A).begin() ; i != (A).end() ; i++) | |
| #define mp make_pair | |
| #define debug( x ) cout << #x << " = " << x << endl | |
| #define clr(v,x) memset( v, x , sizeof v ) | |
| #define all(x) (x).begin() , (x).end() | |
| #define rall(x) (x).rbegin() , (x).rend() | |
| #define f(i,a,b) for(int i = a ; i < b ; i++) | |
| #define fd(i,a,b) for(int i = a ; i >= b ; i--) | |
| #define PI acos( -1.0 ) | |
| #define EPS 1E-9 | |
| #define TAM 100010 | |
| using namespace std; | |
| typedef pair<int,int> ii ; | |
| typedef long long ll ; | |
| typedef long double ld ; | |
| typedef pair<int,ii> pii ; | |
| set<string> v ; | |
| void parse( string s ){ | |
| f( i , 0 , s.size() ){ | |
| if( !isalpha( s[ i ] ) ) s[ i ] = ' ' ; | |
| else s[ i ] = tolower( s[ i ] ) ; | |
| } | |
| string cad ; | |
| istringstream is( s ) ; | |
| while( is >> cad ) v.insert( cad ) ; | |
| } | |
| int main(){ | |
| string s ; | |
| while( cin >> s ) parse( s ) ; | |
| FOR(i,v) cout << *i << endl ; | |
| return 0 ; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment