Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
156
//g++ 5.4.0 #include <iostream> #include <algorithm> #include <map> #include <utility> #include <vector> using namespace std; string conversor(string cadena){ for(int i=0; i<cadena.size(); i++){ if(cadena[i]>='A' and cadena[i]<='Z'){ cadena[i]=cadena[i]+('a'-'A'); } } sort(cadena.begin(), cadena.end()); return cadena; } int main() { string entrada,prueba; map<string,vector<string>> indice; vector<string> buenas; while(true){ cin>>entrada; if(not entrada.compare("#")) break; prueba=conversor(entrada); //cout<<prueba<<"\n"; indice[prueba].push_back(entrada); } for(auto a: indice){ if(a.second.size()==1) buenas.push_back(a.second[0]); } sort(buenas.begin(),buenas.end()); for(auto a: buenas){ cout<<a<<"\n"; } }
run
|
edit
|
history
|
help
0
CyclicExpression Checker
New wall
lab17feb22x4B.cpp
Float
Split in C++ (Simple)
Functions-Part I
UsingAlgorithm
tuple_list_of
Search a 2D Matrix
Test 5(2020)