Blog Archives

LightOJ 1056 – Olympics

Tagged with:
Posted in Light OJ

Light OJ 1307 – Counting Triangles

Tagged with:
Posted in Light OJ

Light OJ 1275 – Internet Service Providers [solved]

Tagged with:
Posted in Light OJ, Problem Solving

Light OJ 1148 – Mad Counting [hints+solution]

Hints: Mad Counting , It’s really a mad counting problem. To solved this problem, you have to think in a different way while you are counting. Since we have to count the minimum possible populations, It’s only possible when we

Tagged with:
Posted in Light OJ, Problem Solving

LightOJ 1259 – Goldbach`s Conjecture [solved]

Hints: Generate primes upto 10^7 and go through primes within an iterative approach and check: N- primes[i] is prime or not? Code:

Tagged with: ,
Posted in Light OJ, Problem Solving

LightOJ 1369 – Answering Queries [solved]

Explanation: Let’s an arrray A[4]={1, 4, 3, 5}. According to given function, SUM: = (1-4)+(1-3)+(1-5)+(4-3)+(4-5)+(3-5) = 1-4+1-3+1-5+4-3+4-5+3-5 = 1+1+1+4+4+3-4-3-3-5-5-5 = (1×3)+(4×2)+(3×1)-(4×1)-(3×2)-(5×3) = ? Isn’t easy to get SUM from the array? Here is the code to get SUM: So, for

Tagged with: ,
Posted in Light OJ, Problem Solving

Light OJ 1179 – Joshephus Problem [solved]

Joshephus Problem is a very interesting mathematical problem. To solve this problem you have to think bottom to top approach. Since at the end there must be one alive, before then there was two alive. Result can be found through

Tagged with: ,
Posted in Light OJ

Light OJ – 1297 || Largest Box [solved]

Tagged with: ,
Posted in Light OJ

Light OJ 1043 – Triangle Partitioning [solved]

This problem can be solved using Binary Search. But I’ve found a one line solution using Basic Geometry. You can try to solve using using Binary Search. To learn Binary Search you can go through this way: Binary Search Explanation:

Tagged with: ,
Posted in Light OJ

Light OJ 1045 – Digits of Factorial [solved]

Posted in Light OJ

Light OJ – 1080 (Binary Simulation) [solved]

Tagged with:
Posted in Light OJ

LightOJ 1020 – A Childhood Game

Tagged with: ,
Posted in Light OJ
Follow IU Convergent on WordPress.com
Community!
Views
  • 29,806 views