Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
#include
#include
#include
#include
using namespace std; int PrintResult(string msg) { int count = 0; // Define the set of allowed characters set
allowed = {'H', 'I', 'N', 'O', 'S', 'X', 'Z', 'W'}; // Use stringstream to split the message into words stringstream ss(msg); string word; while (ss >> word) { bool isOutstanding = true; // Check if all characters in the word are in the allowed set for (char c : word) { if (allowed.find(c) == allowed.end()) { isOutstanding = false; break; } } // If the word is outstanding, increment the count if (isOutstanding) { count++; } } return count; } int main() { string msg; getline(cin, msg); cout << PrintResult(msg) << endl; return 0; }
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)