摘要: 前缀和 阅读全文
posted @ 2020-12-13 16:42 然终酒肆 阅读(91) 评论(0) 推荐(0) 编辑
摘要: 相信我 会更快 #include <bits/stdc++.h> using namespace std; int main(int argc, char** argv) { string c2 = "56"; int a = c2[0] - '0'; cout << a<<endl; char c 阅读全文
posted @ 2020-12-13 16:02 然终酒肆 阅读(312) 评论(0) 推荐(0) 编辑
摘要: 给定一个整数数组,判断是否存在重复元素。 如果任意一值在数组中出现至少两次,函数返回 true 。如果数组中每个元素都不相同,则返回 false 。 最简洁的代码: set函数去重 class Solution: def containsDuplicate(self, nums: List[int] 阅读全文
posted @ 2020-12-13 14:51 然终酒肆 阅读(558) 评论(0) 推荐(0) 编辑
摘要: 位运算的奇技淫巧 阅读全文
posted @ 2020-12-13 12:59 然终酒肆 阅读(62) 评论(0) 推荐(0) 编辑
摘要: import java.util.*; 阅读全文
posted @ 2020-12-13 11:37 然终酒肆 阅读(453) 评论(0) 推荐(0) 编辑
摘要: 获取类功能 public class test0 { public static void main(String[] args) { String str = "anAdEfg"; System.out.println("String类的获取功能"); //获取字符串的长度 int length 阅读全文
posted @ 2020-12-13 11:32 然终酒肆 阅读(107) 评论(0) 推荐(0) 编辑