Skip to content

SL TECH ACADEMY

Contact us
  • Home
  • C++
  • Pyhton
  • Java
  • Networking
  • Problem Solving
    • Algorithms
    • Data Structures
  • Contests
    • IOI
    • APIO
    • Google
      • Code Jam
      • Hash Code
      • Kick Start
  • Resources

SL TECH ACADEMY

Author: Pasindu Piumal

  • Codechef

Chef and Meetings – Codechef Solution – February Challenge 2021 Division 3

imageByPasindu Piumal2021-02-08
Chef and Meetings – Codechef Solution – February Challenge 2021 Division 3
A time is a string in the format “HH:MM AM” or “HH:MM PM” (without quotes), where HH and MM are always two-digit numbers. A day starts at 12:00 AM and ends at 11:59 PM. You may refer here for understanding the 12-hour clock format.Chef has scheduled a

Read More

  • Codeforces

Codeforces Round 697 – Ball in Berland Solution

imageByPasindu Piumal2021-01-27
Codeforces Round 697 – Ball in Berland Solution
At the school where Vasya is studying, preparations are underway for the graduation ceremony. One of the planned performances is a ball, which will be attended by pairs of boys and girls. Each class must present two couples to the ball. In Vasya’s class, a boys and b

Read More

  • Codeforces

Codeforces Round 697 – New Year’s Number Solution

imageByPasindu Piumal2021-01-27
Codeforces Round 697 – New Year’s Number Solution
Polycarp remembered the 2020-th year, and he is happy with the arrival of the new 2021-th year. To remember such a wonderful moment, Polycarp wants to represent the number n as the sum of a certain number of 2020 and a certain number of 2021. For example, if: n=4041, then

Read More

  • Codeforces

Codeforces Round 697 – Odd Divisor Solution

imageByPasindu Piumal2021-01-27
Codeforces Round 697 – Odd Divisor Solution
Problem : You are given an integer n. Check if n has an odd divisor, greater than one (does there exist such a number x (x>1) that n is divisible by x and x is odd). For example, if n=6, then there is x=3. If n=4, then such a number does not exist. Input : The first line

Read More

  • IOI

IOI 2020 – Contest Day 1- Tickets Problem and Solution

imageByPasindu Piumal2020-09-24
IOI 2020 – Contest Day 1- Tickets Problem and Solution
The 32nd International Olympiad in Informatics was held in Online in 2020. There were two competition days, with 3 tasks given to the competitors on each day. You can see Tickets Problem and Solution below. Problem : Solution :  721 total views,  2 views today

Read More

  • IOI

IOI 2020 – Contest Day 1- Supertrees Problem and Solution

imageByPasindu Piumal2020-09-24
IOI 2020 – Contest Day 1- Supertrees Problem and Solution
The 32nd International Olympiad in Informatics was held in Online in 2020. There were two competition days, with 3 tasks given to the competitors on each day. You can see Supertrees Problem and Solution below. Problem : Solution :  613 total views,

Read More

  • IOI

IOI 2020 – Contest Day 1- Plants Problem and Solution

imageByPasindu Piumal2020-09-24
IOI 2020 – Contest Day 1- Plants Problem and Solution
The 32nd International Olympiad in Informatics was held in Online in 2020. There were two competition days, with 3 tasks given to the competitors on each day. You can see Plants Problem and Solution below. Problem : Solution :  436 total views

Read More

  • Algorithms

Day of the Programmer – HackerRank Solution

imageByPasindu Piumal2020-09-11
Day of the Programmer – HackerRank Solution
Problem : Marie invented a Time Machine and wants to test it by time-traveling to visit Russia on the Day of the Programmer (the 256th day of the year) during a year in the inclusive range from 1700 to 2700. From 1700 to 1917, Russia’s official calendar was the Julian

Read More

  • APIO

APIO 2020 Problems and Solutions – Fun Tour

imageByPasindu Piumal2020-09-05
APIO 2020 Problems and Solutions – Fun Tour
Time limit 2 s Memory limit 512 MB Problem : There are NN attractions in the biggest theme park in Jakarta, numbered from 00 to N - 1N−1. These attractions are connected by N - 1N−1 bidirectional roads such that there is a unique path between any pair of attractions through

Read More

  • APIO

APIO 2020 Problems and Solutions – Swapping Cities

imageByPasindu Piumal2020-09-05
APIO 2020 Problems and Solutions – Swapping Cities
Time limit 2 s Memory limit 512 MB Problem : There are NN cities in Indonesia, numbered from 00 to N - 1N−1. There are also MM two-way roads, numbered from 00 to M - 1M−1. Each road connects two different cities. The ii-th road connects the U[i]U[i]-th city and

Read More

  • APIO

APIO 2020 Problems and Solutions – Painting Walls

imageByPasindu Piumal2020-09-05
APIO 2020 Problems and Solutions – Painting Walls
Time limit 1500 ms Memory limit 512 MB Problem : It has been a while since the last time Pak Dengklek painted the wall on his house, so he wants to repaint it. The wall consists of NN segments, numbered from 00 to N - 1N−1. For this problem, we

Read More

  • Algorithms

Migratory Birds – HackerRank Solution

imageByPasindu Piumal2020-09-03
Migratory Birds – HackerRank Solution
Problem : You have been asked to help study the population of birds migrating across the continent. Each type of bird you are interested in will be identified by an integer value. Each time a particular kind of bird is spotted, its id number will be added to your array of

Read More

  • Algorithms

Divisible Sum Pairs – HackerRank Solution

imageByPasindu Piumal2020-09-03
Divisible Sum Pairs – HackerRank Solution
Problem : You are given an array of n integers, ar = [ar[0], ar[1], ..., ar[n-1]], and a positive integer, k. Find and print the number of (i, j) pairs where i < j and ar[i] + ar[j] is divisible by k. For example, ar = [1, 2, 3, 4, 5, 6] and k = 5. Our three pairs meeting

Read More

  • Algorithms

Birthday Chocolate – HackerRank Solution

imageByPasindu Piumal2020-09-01
Birthday Chocolate – HackerRank Solution
Problem : Lily has a chocolate bar that she wants to share it with Ron for his birthday. Each of the squares has an integer on it. She decides to share a contiguous segment of the bar selected such that the length of the segment matches Ron’s birth month and the sum of

Read More

  • Algorithms

Breaking the Records – HackerRank Solutions

imageByPasindu Piumal2020-08-31
Breaking the Records – HackerRank Solutions
Problem : Maria plays college basketball and wants to go pro. Each season she maintains a record of her play. She tabulates the number of times she breaks her season record for most points and least points in a game. Points scored in the first game

Read More

  • Algorithms

Between Two Sets – HackerRank Solution

imageByPasindu Piumal2020-08-25
Between Two Sets – HackerRank Solution
Problem : You will be given two arrays of integers and asked to determine all integers that satisfy the following two conditions: The elements of the first array are all factors of the integer being considered The integer being considered is a factor of all elements of the

Read More

  • Algorithms

Kangaroo – HackerRank Solution

imageByPasindu Piumal2020-08-21
Kangaroo – HackerRank Solution
Problem : You are choreographing a circus show with various animals. For one act, you are given two kangaroos on a number line ready to jump in the positive direction (i.e, toward positive infinity). The first kangaroo starts at location x1 and moves at a rate of v1 meters

Read More

  • Algorithms

Apple and Orange – HackerRank Solution

imageByPasindu Piumal2020-08-21
Apple and Orange – HackerRank Solution
Problem : Sam’s house has an apple tree and an orange tree that yield an abundance of fruit. In the diagram below, the red region denotes his house, where s is the start point, and t is the endpoint. The apple tree is to the left of his house, and the orange tree is to

Read More

  • Algorithms

Grading Students – HackerRank Solution

imageByPasindu Piumal2020-08-21
Grading Students – HackerRank Solution
Problem : HackerLand University has the following grading policy: Every student receives a grade in the inclusive range from 1 to 100. Any grade less than 40 is a failing grade. Sam is a professor at the university and likes to round each student’s grade according to

Read More

  • Algorithms

Time Conversion – HackerRank Solution

imageByPasindu Piumal2020-08-21
Time Conversion – HackerRank Solution
Problem : Given a time in 12-hour AM/PM format, convert it to military (24-hour) time. Note: Midnight is 12:00:00AM on a 12-hour clock, and 00:00:00 on a 24-hour clock. Noon is 12:00:00PM on a 12-hour clock, and 12:00:00 on a 24-hour clock. Function Description : Complete

Read More

Posts navigation

Page 1 Page 2 … Page 5 NextNext page

Last Posts

Chef and Meetings – Codechef Solution – February Challenge 2021 Division 3

2021-02-08

Codeforces Round 697 – Ball in Berland Solution

2021-01-27

Codeforces Round 697 – New Year’s Number Solution

2021-01-27

Codeforces Round 697 – Odd Divisor Solution

2021-01-27
IOI 2020

IOI 2020 – Contest Day 1- Tickets Problem and Solution

2020-09-24

Archives

  • February 2021 (1)
  • January 2021 (3)
  • September 2020 (10)
  • August 2020 (68)
  • July 2020 (18)
Created by SL TECH ACADEMY. Powered by WordPress
Logo
  • Home
  • C++
  • Pyhton
  • Java
  • Networking
  • Problem Solving
    • Algorithms
    • Data Structures
  • Contests
    • IOI
    • APIO
    • Google
      • Code Jam
      • Hash Code
      • Kick Start
  • Resources