← 返回 akunacapital 的题目列表Calculate Positive Profit Combinations
类型:online_judge
Given two lists profit and cost, representing the profit and cost of projects respectively. Count and return the number of combinations where profit minus cost is positive.
Input:
profit: list of integers representing profit for each project.
cost: list of integers representing cost for each project.
Output:
An integer indicating the number of combinations where profit minus cost is positive.
Example: Input: profit = [3, 5, -1], cost = [2, 1, 3] Output: 2
Constraints:
The length of the lists does not exceed 10^6.
Integer values in the lists range from -10^9 to 10^9.
Example
Input
3 5 -1 2 1 3