diff options
Diffstat (limited to 'detect_new.cpp')
-rw-r--r-- | detect_new.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/detect_new.cpp b/detect_new.cpp new file mode 100644 index 0000000..e5bf80c --- /dev/null +++ b/detect_new.cpp @@ -0,0 +1,19 @@ +#include <set> +#include <string> +#include <iostream> + +using namespace std; + +int main() { + set<string> known; + string i; + for (getline(cin, i); cin.good(); getline(cin, i)) { + if (known.count(i)) { + cout << "0" << endl; + }else{ + known.insert(i); + cout << "1" << endl; + } + } + return 0; +} |