dashrath1526's blog

By dashrath1526, history, 4 years ago, In English

Hi,

Is there anything wrong with codeforces Compilers/Interpreters around 9.30 — 11.00 IST. All my submissons are stucked in 'In queue' status.

I can see submissions from other participants also stucked.

Full text and comments »

  • Vote: I like it
  • -20
  • Vote: I do not like it

By dashrath1526, history, 4 years ago, In English

Problem link

n = int(input())
x = list(map(int,input().split()))
y = list(map(int,input().split()))
xy = set(x)
xy.update(y)

flag = False
while n > 0:
    if n in xy:
        n -= 1
        continue
    else:
        flag = True
        break

if flag:
    print('Oh, my keyboard!')
else:
    print('I become the guy.')

As per my understanding of the problem desc, I am not missing anything here. I am new here so correct me if I am wrong.

Test case description. Input 3

1 2

2 2 3

Participant's output I become the guy.

Jury's answer Oh, my keyboard!

Checker comment wrong answer 1st lines differ — expected: 'Oh, my keyboard!', found: 'I become the guy.'

Full text and comments »

  • Vote: I like it
  • -3
  • Vote: I do not like it

By dashrath1526, history, 4 years ago, In English

Getting a time limit exceeds error on test #7. Help and understanding of efficient solution would be well appreciated.

n = int(input())
string = ''
group_count = 0
for i in range(n):
    num = input()

    if i == 0 or num[0] == string[-1]:
        string += num     
        group_count += 1
    else:
        string += num

print(group_count)

Full text and comments »

  • Vote: I like it
  • -16
  • Vote: I do not like it

By dashrath1526, history, 4 years ago, In English

Hi,

I am new to this platform and started solving problems by difficulty level starting from basic. This problem 116A-Tram, which gives task to find the trams min capacity. Submission Id: 90279549

It showing error on test #3, however when I runs the same code in my local machine its showing perfect answer which is 11. Screenshot is attached for output verification.

n = int(input())
stops = []
total = 0
for i in range(n):
    stop = list(map(int,input().split()))
    stops.append(stop)
    
max_total = stops[0][0]
for i in range(4):
    total = stops[i][1] + (total - stops[i][0])
        
    if total >= max_total:
        max_total = total
        
print(max_total)

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it