Комментарии
На SlavicG → Codeforces Round #726 (Div. 2), 5 лет назад
0

E1 passed main tests

My submission is in queue from 30 mins, is the system down??

if (float(r+1)/2)>l then NO else YES

I think it's supposed to be solved in O(n), sol

На Vladik → Codeforces Round #678 (Div. 2). Editorial, 6 лет назад
0

1 is not prime :) and its given in problem that sum should be prime

На vovuh → Codeforces Round #674 (Div. 3) Editorial, 6 лет назад
0

C was a case work ^^'

0

One thing you can do is check if array is strictly decreasing, then answer will be NO in all other cases answer will be YES

На shishyando → Codeforces Round #671 Editorial, 6 лет назад
0

Value of num is very large it can't fit in int or long long , use string for num , A

На shishyando → Codeforces Round #671 Editorial, 6 лет назад
0

The input number is very large you cannot store it in int or long , use string to store the number, A

На shishyando → Codeforces Round #671 Editorial, 6 лет назад
0

For problem A size of number is not given so you cannot store it in int try using string to input number, A

На shishyando → Codeforces Round #671 Editorial, 6 лет назад
0

Print 0 and print array in any order

На 055D → Codeforces Round #665 (Div. 2) Editorial, 6 лет назад
0

if you maximize 2,2 pair you might consume some 2 from (2,1) pair which has potential of adding +2 where as in 2,2 pair it will add 0 .

На 055D → Codeforces Round #665 (Div. 2) Editorial, 6 лет назад
0

if k<n, we can either generate all odd values of k(less than equal to n) if n is odd or we can generate all even values of k(less than equal to n) if n is even

if n=8: {(b=8, k=8) (b=7, k=6) (b=6, k=4) (b=5, k=2) (b=4, k=0)}

if n=9: {(b=9, k=9) (b=8, k=7) (b=7, k=5) (b=6, k=3) (b=5, k=1)}

Hence if n is even and the desired k is even then ans=0,else increment n and ans=1

else if n is odd and the desired k odd then ans=0, else increment n ans ans=1

На gotexans → Codeforces Round #655 (Div. 2), 6 лет назад
0

The maximum number of special exchange on any case will be 2, i took a single subarray and for every element in that subarray i checked whether it is in its correct position or not, and even if there was a single element in correct place it would take 2 special exchange(as after the change no element should have same position should similar to its initial position, so all elements in correct position must be displaced). my solution it passed the pretests.

На chokudai → AtCoder Beginner Contest 171 Announcement, 6 лет назад
0

can you point out the mistake in my code for problem C and why have you decremented n in while loop?

На awoo → Разбор Educational Codeforces Round 89, 6 лет назад
0
На awoo → Разбор Educational Codeforces Round 89, 6 лет назад
0

We have been provided with an array all elements are equal to zero except 1, and we need to find the number of elements which can end up equal to 1 after swapping . Now for the queries if the given interval is overlapping with even one element equal to 1 the all the elements in that interval in can end up as 1. So till the last query we can calculate all the elements which can be turned 1. Here is my solution B

На Stepavly → Codeforces Round #644 (Div. 3) Editorial, 6 лет назад
+3

Thanks i got it !^_^

На Stepavly → Codeforces Round #644 (Div. 3) Editorial, 6 лет назад
0

Why does the array needs to be of char type??

На Stepavly → Codeforces Round #644 (Div. 3) Editorial, 6 лет назад
+3

Can somebody help me with my solution to problem E?? my solution E