Big_Integer's blog

By Big_Integer, history, 4 years ago, In English

Hi I was just upsolving some problems when a weird thing caught my attention. I was trying to write an efficient code that was much lighter and less complex compared to the previous submission of a problem.

The previous submission had 15 ms and 0KB, and the newer one has 0 ms and 3600KB It took extra 3600KB that it ain't suppose to take (⊙_⊙)

Yeah, I had 50% success yet, it made me confused, " Why you eat so much memory program? ", This question was bugging me literary so I submitted a blank code.

So, you can see that this Blank code is also taking 3600KB you can also see for yourself by checking it in the custom test.

Can someone please explain, why is this weird behavior? because of the Compiler Flag or something else? I know this should not be any issue, but I just can't get over it.

Thank you.

Full text and comments »

  • Vote: I like it
  • +13
  • Vote: I do not like it

By Big_Integer, history, 5 years ago, In English

Hello, I have been trying to solve this problem for some time but getting WA.

The Problem This is a simple task for you.You have to write a simple code that can take three input a, b and c which are the length of the three sides of a Pythagorean triangle and check the triangle is valid or invalid.

The Input

The input file contains several lines. Each line contains three positive integers a, b, c < 100 which indicates the three sides of a triangle. Input is terminated by EOF.

The Output

For each input lines print a comment. Which contains if the triangle is right then “Valid.”, if the triangle is not right then “Invalid.” (Quote for clarification) in a separate line.

Sample Input

6 9 4 13 5 12

Sample Output

Invalid. Valid.

My code

But this approaches are not working out for me. I keep getting WA. I checked both of this code against this triplets and they checked out correctly.

original problem link : http://school.outsbook.com/problems/problemdetails/363

Please provide me some thoughts or error that is causing WA.

Thank you.

Full text and comments »

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

By Big_Integer, history, 6 years ago, In English

Hello Guys... I got stuck on a problem and need a hint for this problem.

Parag has an old watch. It has only two hands of the minute and hour. Two hands rotate around the center of the circle, indicating hours and minutes. The clock has 60 marks placed around its perimeter, with the distance between consecutive marks being constant. The minute hand moves from its current mark to the next exactly once every minute. The hour hand moves from its current mark to the next exactly once every 12 minutes, so it advances five marks each hour. As you know at 03:00 or 09:00 it creates a 90 degree angle. At 02:00 or 10:00 it creates a 60 degree angle. But this hands never creates a 65 degree angle.

As Parag loves geometry a lot he creates a technique to find either the angle is in between hands or not. Your task is to find the technique of Parag

The Input The Input file contains several cases. Each case contains an integer which denotes the angle, A (0 <= A <= 180). Input is terminated by EOF.

The Output For each line of input print “Y” if the angle in between the motions and “N” if not with their case number in a separate line.

Sample Input 60 65 90

Sample Output Case 1: Y Case 2: N Case 3: Y

problem link : http://school.outsbook.com/problems/problemdetails/368

I tried This Claculation mathod to find all 0-180 degree value, and they exists. So where is the catch? Thank you.

Full text and comments »

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