Maximum Sales

Problem Hyun-soo’s father runs a bakery. Hyeon-soo’s father gave him the sales record for N days and told him to find the maximum sales for K consecutive days. If N=10, the sales record for 10 days is as follows. In this case, if K = 3 The maximum sales for 3 consecutive days is 11+20+25=560,000 won…

Read More

Consecutive Sub Sequence 2

Problem You are given a sequence of N numbers. Write a program to find how many times in this sequence the sum of consecutive subsequences is less than or equal to a specific number M. If N=5, M=5 and the sequence is A continuous subsequence whose sum is 5 or less is {1}, {3}, {1}, {2}, {3}, {1,…

Read More

Consecutive Sub Sequence

Problem You are given a sequence of N numbers. Write a program to count how many times in this sequence the sum of consecutive subsequences is a specific number M. If N=8, M=6 and the sequence is There are three consecutive subsequences whose sum is 6: {2, 1, 3}, {1, 3, 1, 1}, and {3, 1, 1,…

Read More

Finding Commons

Problem Given two sets A and B, write a program that extracts the common elements of the two sets and outputs them in ascending order. input The first line gives the size N of set A (1<=N<=30,000). The second line gives N elements. Duplicate elements are not given. The third line gives the size M of…

Read More

Concatenate Two Arrays

Problem Given two arrays sorted in ascending order, write a program that merges the two arrays in ascending order and prints them. input The first line gives the size N (1<=N<=100) of the first array. The second line gives the N array elements in ascending order. The third line gives the size M (…

Read More
Page 9 Of 26