Duha decided to have a trip to Singapore by plane. The airplane had nn seats numbered from 11 to nn, and nn passengers including Duha which were also counted from 11 to nn. The passenger with number ii held the ticket corresponding to the seat with n…
It is my great honour to introduce myself to you here. My name is Aloysius Benjy Cobweb Dartagnan Egbert Felix Gaspar Humbert Ignatius Jayden Kasper Leroy Maximilian. As a storyteller, today I decide to tell you and others a story about the hero Huri…
Firdaws and Fatinah are living in a country with nn cities, numbered from 11 to nn. Each city has a risk of kidnapping or robbery. Firdaws's home locates in the city uu, and Fatinah's home locates in the city vv. Now you are asked to find the shortes…
Problem Similar to the strange ability of Martin (the hero of Martin Martin), Ghh will random occurrence in one of \(N\) cities every morning and the money will change to \(X\) RMB (No matter how much money had yesterday). Ghh finds that every \(N\)…
Yukino With Subinterval Yukino has an array a_1, a_2 \cdots a_na1,a2⋯*a**n*. As a tsundere girl, Yukino is fond of studying subinterval. Today, she gives you four integers l, r, x, yl,r,x,y, and she is looking for how many different subintervals [L,…