A - Counting Passes
Description
Problem Statement N N N people labeled 1 , 2 , … , N 1,2,\dots,N 1,2,…,N took an exam, and person i i i scored A i A_i Ai points. Only those who scored at least L L L points pass this exam. Determine how many peopl…
题目 题解
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val0, leftNone, rightNone):
# self.val val
# self.left left
# self.right right
class Solution:def rob(self, root: Optional[TreeNode]) ->…
第一题: 这个题是一个简单题,数据范围也特别小,所以直接使用模拟方式暴力解答。
直接进行行移动的过程,然后检查移动后的结果是否与移动前相同。
代码:
public class Solution {// 将指定行循环右移k次pri…