一二三四五 上山打老虎

随笔分类 -  一维前缀和

基础算法
摘要:第一题:https://leetcode-cn.com/problems/determine-whether-matrix-can-be-obtained-by-rotation/ 1886. 判断矩阵经轮转后是否一致 思路:90度顺时针旋转后,(i,j)->(j,n-i-1),分别计算旋转得到的四 阅读全文
posted @ 2021-06-07 20:56 abestxun 阅读(58) 评论(0) 推荐(0) 编辑
摘要:链接:http://118.190.20.162/view.page?gpid=T78 思路:前缀和,区间是左闭右开的 代码: #include<bits/stdc++.h> using namespace std; int a[(int)1e6+5]; int main (){ int n; ci 阅读全文
posted @ 2021-03-21 21:48 abestxun 阅读(24) 评论(0) 推荐(0) 编辑
摘要:题目链接 校门外的树:https://ac.nowcoder.com/acm/problem/16649 值周:https://ac.nowcoder.com/acm/problem/24636 数据加强版,加到了1e8 题意:从[0~L]中选取m个区间[l~r],删除[l~r]中的元素,计算最后剩 阅读全文
posted @ 2021-01-26 15:40 abestxun 阅读(93) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示