04 2021 档案

摘要:修改CMakeLists.txt cmake_minimum_required(VERSION 3.17) project(codeforces) set(CMAKE_CXX_STANDARD 20) #add_executable(codeforces main.cpp) # 遍历项目根目录下所有 阅读全文
posted @ 2021-04-02 13:16 rxh1999 阅读(299) 评论(0) 推荐(0) 编辑
摘要:参考文献: http://www.cplusplus.com/reference/algorithm/lower_bound/ http://www.cplusplus.com/reference/algorithm/upper_bound/ 两个comp函数的参数位置是不同的,不能直接使用一个co 阅读全文
posted @ 2021-04-02 11:30 rxh1999 阅读(267) 评论(0) 推荐(0) 编辑
摘要:[52. N皇后 II](https://leetcode-cn.com/problems/n-queens-ii/) 给同学讲一下思考dfs的方法论 ## 1. 思考dfs每个状态的含义 dfs(row)代表当前在第row+1行放置皇后 ```cpp class Solution { public 阅读全文
posted @ 2021-04-01 19:32 rxh1999 阅读(168) 评论(0) 推荐(0) 编辑
摘要:[88. 合并两个有序数组](https://leetcode-cn.com/problems/merge-sorted-array/) 双指针,从后向前做 ```cpp class Solution { public: void merge(vector& nums1, int m, vector 阅读全文
posted @ 2021-04-01 16:26 rxh1999 阅读(27) 评论(0) 推荐(0) 编辑
摘要:// // Created by rxh1999 on 2021/4/1. // #include<iostream> #include<bits/stdc++.h> using namespace std; void suffixArray(){ string s; cin>>s; s+='$'; 阅读全文
posted @ 2021-04-01 12:37 rxh1999 阅读(40) 评论(0) 推荐(0) 编辑