-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
88143de
commit 9d02256
Showing
2 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#include <bits/stdc++.h> | ||
|
||
int main(void) { | ||
|
||
std::string s; std::cin >> s; | ||
std::unordered_map<char, int> 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; | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#include <bits/stdc++.h> | ||
|
||
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; | ||
} | ||
|
||
} |