diff --git a/Atcoder/atcoder_problemset/abc345_a.cpp b/Atcoder/atcoder_problemset/abc345_a.cpp new file mode 100644 index 0000000..e18ff9e --- /dev/null +++ b/Atcoder/atcoder_problemset/abc345_a.cpp @@ -0,0 +1,20 @@ +#include + +int main(void) { + + std::string s; std::cin >> s; + std::unordered_map unmap; + + for(int i = 0; i < (int)s.length(); ++i) + unmap[s[i]]++; + + if(s[0] == '<' and s[s.length()-1] == '>') { + if(unmap['<'] > 1 || unmap['>'] > 1) { + std::cout << "No" << std::endl; + } else + std::cout << "Yes" << std::endl; + } else + std::cout << "No" << std::endl; + +} + diff --git a/Atcoder/atcoder_problemset/abc345_b.cpp b/Atcoder/atcoder_problemset/abc345_b.cpp new file mode 100644 index 0000000..3127046 --- /dev/null +++ b/Atcoder/atcoder_problemset/abc345_b.cpp @@ -0,0 +1,16 @@ +#include + +typedef long long ll; + +int main(void) { + + // Can't use function ceil, because has decimal errors + + ll n; std::cin >> n; + if((n+9) < 0 && ((n+9) % 10 != 0)) + std::cout << (n+9) / 10-1 << std::endl; + else { + std::cout << (n+9) / 10 << std::endl; + } + +} \ No newline at end of file