Problem:


Score : 100 points

Problem Statement

You are given a grid with 2 rows and 3 columns of squares.
The color of the square at the i-th row and j-th column is represented by the character C_{ij}.

Write a program that prints YES if this grid remains the same when rotated 180 degrees, and prints NO otherwise.

Constraints

C_{i,j}(1 \leq i \leq 2, 1 \leq j \leq 3) is a lowercase English letter.

Input

Input is given from Standard Input in the following format:

C_{11}C_{12}C_{13}
C_{21}C_{22}C_{23}

Output

Print YES if this grid remains the same when rotated 180 degrees; print NO otherwise.

Sample Input 1

pot
top

Sample Output 1

YES

This grid remains the same when rotated 180 degrees.

Sample Input 2

tab
bet

Sample Output 2

NO

This grid does not remain the same when rotated 180 degrees.

Sample Input 3

eye
eel

Sample Output 3

NO



Sample input:
pot
top


Sample output:
YES

Submission status: Runtime Error

Solution code:
N = int((input()))

A = [int(i) for i in input().split()]

B = [int(i) for i in input().split()]

C = [int(i) for i in input().split()]

can_make = 0
for upp in range(N):
    for midd in range(N):
        for loww in range(N):
            if A[upp] < B[midd] < C[loww]:
                can_make += 1

print(can_make)

Submission status: Runtime Error

Solution code:
in = {raw_input().split(), raw_input().split()}
bool = true
for i in 0..1:
    for j in 0..2:
        if in[i][j] != in[1-i][2-j]:
            bool = false
            print("NO")
            break
    if bool == false:
        break
        
if bool == true:
    print("YES")

Submission status: Runtime Error

Solution code:
li_a=list(input())
li_b=list(input())
li_a.reverse()
if li_a==li_b:
    print(YES)
else:
    print(NO)

Submission status: Runtime Error

Solution code:
def s(n):
    ret = 0
    sn = str(n)
    for c in sn:
        ret += int(c)
    return ret
 
N = int(input())
t = N
 
ans = float('inf')
for i in range(600000):
    t += N
    ans = min(s(t), ans)
 
print(ans)

Submission status: Runtime Error

Solution code:
# coding: utf-8
N = int(input())
array = []
X = int(100000/N)

for i in range(X):
    Y = N*(i+1)
    STR = str(Y)
    a_list = list(map(float,STR))
    sum_list = sum(a_list)
    array.append(sum_list)
    
min_list = min(array)
print(min_list)

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
import itertools

N = input()

A = map(int, raw_input().split())
B = map(int, raw_input().split())
C = map(int, raw_input().split())


for i, j, k in itertools.product(range(N), range(N), range(N)):
    if A[i]<B[j]<C[k]:
            count+=1
    else:
        continue
print count

Submission status: Runtime Error

Solution code:
#!/user/bin/python
# coding: UTF-8

N = int(raw_input())
A = map(int, raw_input().split())
B = map(int, raw_input().split())
C = map(int, raw_input().split())

A.sort()
B.sort()
C.sort()

n = 0
for i in range(N):
    for j in range(N):
        if A[i] < B[j]:
            for k in range(N):
                if B[j] < C[k]:
                    n = n + 1

print n

Submission status: Runtime Error

Solution code:
N = int(input().strip())

count = 0
while True:
    if (count + 1) ** 2 > N:
        print(count ** 2)
        break
    count += 1

Submission status: Runtime Error

Solution code:
import itertools


def solve():
    N = int(input())
    A = list(map(int, input().split(" ")))
    B = list(map(int, input().split(" ")))
    C = list(map(int, input().split(" ")))

    cnt = 0
    for ele in list((itertools.product(A, B, C))):
        if ele[0] < ele[1] < ele[2]:
            cnt += 1

    print(cnt)

 
solve()

Submission status: Runtime Error

Solution code:
import sys

DBG_FLAG = 0

def p_dbg(str):
    if(DBG_FLAG == 1):
        sys.stdout.flush()
        print str

# 1st. get Num

Num = int(raw_input())

p_dbg('Num : ' + str(Num))

square_max = 1

# MEMORY OVER
# for i in range(1, Num):
#     tmp = i * i
#     p_dbg(str(i) + str(square_max))
#     if(tmp <= Num):
#         square_max = tmp
#     else:
#         break

i = 1
tmp = 1
while tmp < Num:
    p_dbg(str(i) + ':' + str(square_max))
    square_max = tmp
    tmp = i*i
    i = i+1

print square_max

Submission status: Runtime Error

Solution code:
N = int(input().strip())

count = 0
while True:
    if (count + 1) ** 2 > N:
        print(count)
        break
    count += 1

Submission status: Runtime Error

Solution code:
n = int(input())

a = tuple(map(int, input().split()))
b =tuple(map(int, input().split()))
c = tuple(map(int, input().split()))

ans = 0

for i in range(n):
    for j in range(n):
            for k in range(n):
                if a[i] < b[j] < c[k]:
                    ans = ans + 1

print(ans)

Submission status: Runtime Error

Solution code:
c1 = input().split()
c2 = input().split()
c=[]
a =‘YES’
for k in range(3):
    c.append([c1[k]]+[c2[k]])
for j in range(3):
    if c[0][j] = c[1][3-j-1]:
        continue
    else: 
        a=‘NO’
        break
print(a)

Submission status: Runtime Error

Solution code:
import numpy
row1 = input()
row2 = input()
if row1[0] == row2[2] and row1[1] == row2[1] and row1[2] == row2[0]:
  print('YES')
print('NO)

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import math

def main():
    N = int(input())
    for i in reversed(range(N)):
        int_sqrt = int(math.sqrt(i))
        if i == int_sqrt ** 2:
            print(i)
            return None

if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-

C1=raw_input()
C2=raw_input()

if C1[0]==C2[2] and C1[1]==C2[1] and C1[2]==C2[0]:
    print 'YES'
else:
    print 'NO

Submission status: Runtime Error

Solution code:
line1 = sys.stdin.readline().rstrip()
line2 = sys.stdin.readline().rstrip()

len2 = len(line2)

res = True

for i in range(0, len(line1)):
    if line2[len2-1 - i] != line1[i]:
        res = False
        print("NO")
        break

if res == True:
    print("YES")

Submission status: Runtime Error

Solution code:
c1 = input()
c2 = input()
c2 = c2[::-1]

import sys
for (a, b) in zip(c1, c2):
    if a != b:
        print('NO')
        sys.exit(1)

print('YES')

Submission status: Runtime Error

Solution code:
# coding: utf-8
# Your code here!
N = input()
M = input()
N1 = list(N)
M1 = list(M)

if N1[0]==M1[2] and N2[1]==M1[1] and N1[2]==M1[0]:
    print(YES)
else:
    print(NO)

Submission status: Runtime Error

Solution code:
a=input()
a=list(a)
b=input()
b=list(b)
n=len(a)
j=1
for i in range(n):
  if(a[i]!=b[n-i]):
    j=0
if(j==1):
  print("YES")
else:
  print("NO")

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python3
from sys import stdin, stdout

def rint():
   return map(int, stdin.readline().split())
lines = stdin.readlines()

a = input()
b = input()
if a[0] == b[2] and a[1] == b[1] and a[2] == b[0]:
   print("YES")
else:
   print("NO")

Submission status: Runtime Error

Solution code:
t1=raw_input()
t2=raw_input()
if t1[0]==t2[2] and t1[1]==t2[1] and t1[2]==t2[0]:
 return "YES"
else
 return "NO"

Submission status: Runtime Error

Solution code:
t1=raw_input().split(' ')
t2=raw_input().split(' ')
if t1[0]==t2[2] and t1[1]==t2[1] and t1[2]==t2[0]:
 return "YES"
else
 return "NO"