### Ferrarixxx's blog

By Ferrarixxx, history, 3 years ago,

Sorry to Disturb you but this time i have no idea where i am wrong

My Code : Approach Same as that of Editorial

Problem Link : Problem E Omkar and Duck

It shows some error that i can't understand and moreover i can't debug this since i don't know the path the tester program has chosen.

Hoping for a Prompt Reply. :)

• +13

By Ferrarixxx, history, 3 years ago,

Hi, Thanks for opening this Link :)

I have Commented my logic which is almost same as that of editorial Very simple

• -16

By Ferrarixxx, history, 3 years ago,

Hi, Thanks for opening this Link :)

I have Commented my logic which is same as that of editorial Very simple

• +5

By Ferrarixxx, history, 3 years ago,

Internship Online Round Problem

Given an Array of n elements s.t sum of (i)th and (n-i)th element is same for all i. (considering 1 indexed here).Then one element was removed from this array.

Now you are presented with n-1 elements and you need to find that missing element.
How will you do it?? (range of N is -> 10^5)

(Please give code as well if u can) :)

• 0

By Ferrarixxx, history, 3 years ago,

Hi Codeforces Community,

In below simple problem's code, I am not able to understand what mistake i have made in my code

• -20

By Ferrarixxx, history, 3 years ago,

Hi guys ,
I think the editorial's solution (https://codeforces.com/blog/entry/78864)
for this (https://codeforces.com/contest/1367/problem/D) problem is wrong

Proof:
Try this test case :
1
cbazzkjbsdf
3
3 1 0

For the above testcase actual output should have been abc
but according to almost all codes(including editorialist's) its ksz

So am i correct ?? or have i made a mistake in understanding the problem??

I resort to your generous replies.

• -9

By Ferrarixxx, history, 3 years ago,

Hi Guys,
The above picture shows my approach for this problem https://codeforces.com/contest/1354/problem/C1

Am basically using the interior angle subtended by 3 adjacent vertices and then to find the vertical ( perpendicular ) line's length using tan function
But am getting completely unexpected answer.

// -- MY CODE :

long double n;

cin >> n;

// long double angle = (((180 * (2*n — 2)) / (2*n) ) / 360) * 2 * 3.14

long double angle = ((((n — 1)) / n)) * 3.14;

cout << tan(angle) << endl;

PLEASE GUYS HELP ME FIND MY MISTAKE .

• +6

By Ferrarixxx, history, 3 years ago,

Hi Guys,
I hope u are doing well

Actually
I cant understand why my code gives WA on 47 testcase
Even when my code is almost similar to the editorialist's code,

The testcase :
29 425 46 81
405 237 24 45 165 328 134 309 7 236 348 204 368 396 298 343 180 186 395 246 44 53 303 404 271 344 269 292 12

Mycode's output : 1

Problem E Div 3 : https://codeforces.com/contest/1324/problem/E

• -7

By Ferrarixxx, history, 3 years ago,

Hi Am writing this because am highly desperate to find my mistake.

except that i used map and priority_queue
For Problem C ( https://codeforces.com/contest/1350/problem/C )

Am getting WA on test case — 4
https://codeforces.com/contest/1350/submission/80297500

I HAVE COMMENTED MY APPROACH IN MY CODE , WRT ALL THE STEPS

• 0

By Ferrarixxx, history, 3 years ago,

Applied Simple binary search and 2 pointer method to find ans and am getting right ans for the sample test cases I dont know where the flaw is in my code that it gives Wrong output for the extreme corner test case -> Test Case 3

I have commented my code , its very easy to understand ,

Please find my flaw in my code or approach.

• 0

By Ferrarixxx, history, 4 years ago,

Submissions Page : https://codeforces.com/contest/1141/status/E