🗒️1995. 统计特殊四元组
2025-4-25
| 2025-4-25
0  |  阅读时长 0 分钟
type
status
date
slug
summary
tags
category
icon
password
创建时间
Apr 25, 2025 03:45 PM
给你一个 下标从 0 开始 的整数数组 nums ,返回满足下述条件的 不同 四元组 (a, b, c, d) 的 数目 :
  • nums[a] + nums[b] + nums[c] == nums[d] ,且
  • a < b < c < d

零、常用枚举技巧——0.1 枚举右,维护左

两重循环

📎 参考

  • 【题单】常用数据结构(前缀和/差分/栈/队列/堆/字典树/并查集/树状数组/线段树)
  • 3404. 统计特殊子序列的数目1031. 两个非重叠子数组的最大和(二刷)
    Loading...