fork(2) download
  1. #include <iostream>
  2. #include <iterator>
  3. #include <string>
  4. #include <numeric>
  6. using namespace std;
  8. string convert(char c) {
  9. switch (c) {
  10. case 'F': return "Ph";
  11. case 'f': return "ph";
  12. case 'J': return "G";
  13. case 'j': return "g";
  14. case 'K': return "C";
  15. case 'k': return "c";
  16. case 'M': return "Nn";
  17. case 'm': return "nn";
  18. case 'Q': return "Cu";
  19. case 'q': return "cu";
  20. case 'V': return "U";
  21. case 'v': return "u";
  22. case 'W': return "Uu";
  23. case 'w': return "uu";
  24. case 'X': return "Cs";
  25. case 'x': return "cs";
  26. case 'Y': return "I";
  27. case 'y': return "i";
  28. case 'Z': return "S";
  29. case 'z': return "s";
  30. default: return string(1, c);
  31. }
  32. }
  34. int main() {
  35. const char input[] = "The answer is unclear so anyone stumbling on that answer should have started with a **down vote** first.\n"
  36. "\n"
  37. "When that is done we can start investigating if more is needed.\n"
  38. "\n"
  39. "Considering your flag options :\n"
  40. "\n"
  41. " -Not an answer : As soon as an answer is an attempt to answer a question the NAA flags are not your best option.Many of these flags end - up being declined, even for seasoned flaggers.As the language used is debatable we can figure out it attempts to answer.\n"
  42. " - Very Low Quality : This flag has a higher chance of being accepted.Posts that are(close to) gibberish are perfect candidates for this kind of flag.\n"
  43. " - Spam : You're correct that promoting your own or a service/product is not acceptable in most cases. At first sight the post under scrutiny doesn't seem to be promoting anything.Spam flags have a big impact, they carry an automatic down vote with them and after 6 spam flags a - 100 reputation penalty for the poster.If a spam flag was raised on that answer it could have been declined. *Closer inspection / investigation reveals that the answer is also promotional for their own library*\n"
  44. "\n"
  45. " If promotion happens in comments I would use a custom flag and explain for the moderator clearly what kind of pattern you see that you feel needs their attention.\n"
  46. "\n"
  47. " **tl; dr** Down vote the answer and flag as Very Low Quality.\n";
  49. cout << accumulate(begin(input), end(input), string{}, [](const auto& lhs, const auto& rhs) { return lhs + convert(rhs); });
  50. }
Success #stdin #stdout 0s 3460KB
Standard input is empty
The ansuuer is unclear so anione stunnbling on that ansuuer should haue started uuith a **douun uote** phirst.

Uuhen that is done uue can start inuestigating iph nnore is needed.

Considering iour phlag options :

	-Not an ansuuer : As soon as an ansuuer is an attennpt to ansuuer a cuuestion the NAA phlags are not iour best option.Nnani oph these phlags end - up being declined, euen phor seasoned phlaggers.As the language used is debatable uue can phigure out it attennpts to ansuuer.
		- Ueri Louu Cuualiti : This phlag has a higher chance oph being accepted.Posts that are(close to) gibberish are perphect candidates phor this cind oph phlag.
		- Spann : Iou're correct that pronnoting iour ouun or a seruice/product is not acceptable in nnost cases. At phirst sight the post under scrutini doesn't seenn to be pronnoting anithing.Spann phlags haue a big innpact, thei carri an autonnatic douun uote uuith thenn and aphter 6 spann phlags a - 100 reputation penalti phor the poster.Iph a spann phlag uuas raised on that ansuuer it could haue been declined. *Closer inspection / inuestigation reueals that the ansuuer is also pronnotional phor their ouun librari*

		Iph pronnotion happens in connnnents I uuould use a custonn phlag and ecsplain phor the nnoderator clearli uuhat cind oph pattern iou see that iou pheel needs their attention.

		**tl; dr** Douun uote the ansuuer and phlag as Ueri Louu Cuualiti.