Betting Business

You have opened a new betting business. You have decided that you will accept bets on the upcoming C...

Pile of Crabs

There is a pile of crabs standing on one top of another. There are total NNN crabs numbered 111 to ...

GCD and Sum

Congratulations! You’ve been hired in “Buggy Softwares Ltd.” And you’ve been already given your firs...

Melencolia I

According to Wikipedia, Albrecht Dürer (May 21, 1471 - April 6, 1528) was a German painter, printma...

Nearest Co-Prime

Two numbers are relatively prime or co-prime if their greatest common divisor is 111. In this proble...

The Answer to Everything

What is the answer to the ultimate question of Life, the universe, and everything? It is You will b...

AND Maximum Spanning Tree

You have a weighted undirected complete graph of NNN nodes numbered from 000 to N−1N-1N−1. The weigh...

Caching Combinatorics

Recently Arya the little panda got a permutation of size AAA as a birthday present from his parents....

String Sorting

You'll be given a string s=s1s2.....sns = s_1s_2.....s_ns=s1​s2​.....sn​ of length nnn consisting of...

Dancing Tuples

Given an array AAA of size nnn, find how many tuple (i,j,k)(i, j, k)(i,j,k) are there such that 1≤i&...

Matrix Construction

Construct a square matrix aaa of size n×nn×nn×n satisfying the following conditions, Each row of th...

Maximize Mismatch

You are given a permutation PPP of number 1,⋯ ,n1, \cdots , n1,⋯,n (I.E. each number occurs exactly ...

No More Shortest Path

You are given a weighted directed graph with nnn nodes and mmm edges. Node SSS is marked as the sour...

Jini and the One

Jini’s favorite number is one. She always looks for one in any number and if she finds the digit 1 i...

Here Is a Treat for You 🍕🍔

Kagaya Ubuyashiki, the 97-th leader of the Demon Slayer Corps, Also known as Oyakata-sama to the Dem...

Road to MUZAN

From the earliest times, humanity knows about human-eating monsters, lurking in the darkness to devo...

Inosuke and Trailing Zero

Inosuke and Tanziro are overjoyed because Mr.Haganezuka is bringing their sword of revenge. Because ...

Tanjiro’s Training With Kanao

After the fight in the Natagumo Mountain, Tanjiro felt the need to get sharper. Because in recent fi...

Bored in Box

After becoming a demon, Nejuko can’t go out in the sunlight. Most of the daytime she stays in a box....

Vaccination in BDesh

BDesh is a very peaceful country with a smaller population. Recently a Spider Demon with a dangerous...

Treat? Itadakimasu…😋

So the fight against the demonized humans, who eat good humans, is raging on. And the cause for thes...

Buy Two, Get One Free

During the Covid-19 pandemic, the members of the Demon Slayer Corps are relaxing at their own houses...

Heart of the Demon

“The weak have no rights or choices. Their only fate is to be relentlessly crushed by the strong!” ...

Change Queries

Today is a very special day for Rubel. Recently he got a job in a software company. Now today is the...

Fascination of ZERO

Sajeeb and Shoikot are two friends. Both are love mathematics. Sajeeb has a fascination with ZERO. T...