-
-
Save juliobguedes/23500a1e2c1de4e91ecc04a4626d14db to your computer and use it in GitHub Desktop.
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
# (C) Júlio Guedes | |
# ATAL 2019.2 | |
letters = input() | |
hello = "hello" | |
pointer = 0 | |
for l in letters: | |
if pointer < len(hello): | |
if (l == hello[pointer]): | |
pointer += 1 | |
if (pointer == len(hello)): | |
print("YES") | |
else: | |
print("NO") |
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
# coding: utf-8 | |
# (C) Júlio Barreto | |
# Lineland Mail - Codeforces | |
n = int(raw_input()) | |
c = map(int, raw_input().split()) | |
for city in range(len(c)): | |
if city == 0: | |
print abs(c[city + 1] - c[city]), abs(c[-1] - c[city]) | |
elif city == len(c) - 1: | |
print abs(c[city] - c[city-1]), abs(c[city] - c[0]) | |
else: | |
mini = min(c[city] - c[city-1], c[city+1] - c[city]) | |
maxi = max(c[-1] - c[city], c[city] - c[0]) | |
print mini, maxi |
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
# coding: utf-8 | |
# (C) Júlio Guedes | |
# ATAL 2019.2 | |
s = raw_input() | |
c = 26 * (len(s) + 1) - len(s) | |
print c |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment