diff options
| author | Omar Magdy <omar.professional8777@gmail.com> | 2022-06-25 18:32:00 +0200 |
|---|---|---|
| committer | Omar Magdy <omar.professional8777@gmail.com> | 2022-06-25 18:32:00 +0200 |
| commit | 7c3f32fab3b1a9d628d6856e7a923eb3c3b1ce5f (patch) | |
| tree | 484c58be6bc4ceadf35010ed8b81854994903503 /Borze/main.cpp | |
| parent | a0a07a438b6804fdca0e18b2d626ceedb982611c (diff) | |
| download | competitive-programming-7c3f32fab3b1a9d628d6856e7a923eb3c3b1ce5f.tar.xz competitive-programming-7c3f32fab3b1a9d628d6856e7a923eb3c3b1ce5f.zip | |
Solved a couple of problems from codechef and codeforces
Diffstat (limited to 'Borze/main.cpp')
| -rw-r--r-- | Borze/main.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Borze/main.cpp b/Borze/main.cpp new file mode 100644 index 0000000..b35852f --- /dev/null +++ b/Borze/main.cpp @@ -0,0 +1,14 @@ +#include<bits/stdc++.h> + +using namespace std; + +int main () { + ios_base::sync_with_stdio(false); + cin.tie(NULL); + string s; + cin >> s; + s = regex_replace(s, regex("--"), "2"); + s = regex_replace(s, regex("-\\."), "1"); + s = regex_replace(s, regex("\\."), "0"); + cout << s << endl; +} |
