문제 A non-empty array A consisting of N integers is given. The array contains an odd number of elements, and each element of the array can be paired
A small frog wants to get to the other side of the road. The frog is currently located at position X and wants to get to a position greater than or eq
An array A consisting of N different integers is given. The array contains integers in the range 1..(N + 1), which means that exactly one element is m
A non-empty array A consisting of N integers is given. Array A represents numbers on a tape.Any integer P, such that 0 < P < N, splits this tape
A small frog wants to get to the other side of a river. The frog is initially located on one bank of the river (position 0) and wants to get to the op
A non-empty array A consisting of N integers is given.A permutation is a sequence containing each element from 1 to N once, and only once.For example,
Write a function:function solution(A, B, K);that, given three integers A, B and K, returns the number of integers within the range A..B that are divis
A DNA sequence can be represented as a string consisting of the letters A, C, G and T, which correspond to the types of successive nucleotides in the
A non-empty array A consisting of N integers is given. A pair of integers (P, Q), such that 0 ≤ P < Q < N, is called a slice of array A (notice
Write a functionfunction solution(A);that, given an array A consisting of N integers, returns the number of distinct values in array A.For example, gi
A non-empty array A consisting of N integers is given. The product of triplet (P, Q, R) equates to AP AQ AR (0 ≤ P < Q < R < N).For example
An array A consisting of N integers is given. A triplet (P, Q, R) is triangular if 0 ≤ P < Q < R < N and:AP + AQ > AR,AQ + AR > AP,AR + AP >
We draw N discs on a plane. The discs are numbered from 0 to N − 1. An array A of N non-negative integers, specifying the radiuses of the discs, is gi
A string S consisting of N characters is considered to be properly nested if any of the following conditions is true:S is empty;S has the form "(U)" o
You are given two non-empty arrays A and B consisting of N integers. Arrays A and B represent N voracious fish in a river, ordered downstream along th
A string S consisting of N characters is called properly nested if:S is empty;S has the form "(U)" where U is a properly nested string;S has the form
An array A consisting of N integers is given. The dominator of array A is the value that occurs in more than half of the elements of A.For example, co
A non-empty array A consisting of N integers is given.The leader of this array is the value that occurs in more than half of the elements of A.An equi
An array A consisting of N integers is given. It contains daily prices of a stock share for a period of N consecutive days. If a single share was boug