3306 - I2P(II)2026_Kuo_HW2 Scoreboard

Time

2026/03/10 15:20:00 2026/03/24 12:00:00

Clarification

# Problem Asker Description Reply Replier Reply Time For all team

# Problem Pass Rate (passed user / total user)
14417 Holo the wise wolf
14888 Let The Water Flow
14893 Cortisol Meter

14417 - Holo the wise wolf   

Description

Lawrence and Holo were traveling merchants who went from town to town trading various goods in order to make a profit. However, Holo spent too much money on other things like clothes, shoes, oil, comb, and lots of apples! Hence, Lawrence was upset about this and told her to records all these expense. Holo can do the math without any difficulty, but she was too lazy to do it, so she ask for your help. Please design a program which can do simple addition like 2486+7414 or 1919810+114514.

Input

The first line contains a single string s, representing the mathematical expression with two numbers and an operator +.

The string only includes numbers from 0~9 and + operator which would only appears once.

The length of the string would not exceed 200 characters.

The digits of the two numbers would not exceed 100 characters, but it might be too big to store in long long.

 

Output

Output the answer of the mathematical expression.

Note that you do NOT need to print '\n' at the end of the output.

Sample Input  Download

Sample Output  Download




Discuss




14888 - Let The Water Flow   

Description

You are given an N * M grid representing a terrain, where each cell contains an integer between 1 and 15 representing its height.

A water source is placed at the top-left corner (0, 0). Water can flow from a cell to any of its four adjacent neighbors (up, down, left, and right), but only if the neighbor's height is less than or equal to the current cell's height.

Your task is to calculate the total number of cells that will be covered by water (including water source).

 

Constraints

1 <= N, M <= 100

 

Input

  • The first line contains two integers N and M, representing the number of rows and columns.

  • The following N lines each contain M integers, representing the heights of the cells in the grid.

Output

Output a single integer with '\n': the total number of cells reachable by the water from the top-left corner.

Sample Input  Download

Sample Output  Download




Discuss




14893 - Cortisol Meter   

Description

It is the start of the semester, Tachyon and her fellow classmates are preparing for the second lab in Introduction to Programming(II).
To measure how stressful she is during the first few weeks, Tachyon recorded a daily "stress fluctuation" value for N days:

  • A positive integer indicates that her stress level went up
  • A negative integer indicates that her stress level went down

Afterward, Tachyon wants to compute her cortisol level during selected periods of time. For each of Q queries, she chooses two day a and b (both days are included), and outputs the sum of stress fluctuations over the selected period.

 

 

 

 

 

 

 

 

 

 

 

Constraints

  • 1 <= N <= 10000
  • 1 <= Q <= 100
  • 0 <= a <= b < N
  • -100 <= Ai <= 100

Input

  • The first line contains an integer N
  • The second line contains N integers, representing the "stress fluctuation" that day
  • The third line contains an integer Q
  • The next Q lines each contain two integers a b, representing the selected period of days (both inclusive)

Output

  • For each query, output a single line containing the sum of stress fluctuations from day a to day (both inclusive)
  • Output '\n' after every line

Sample Input  Download

Sample Output  Download




Discuss