07 2020 档案
摘要:本文只是解决安装ubuntu安装中遇到的一般卡死问题,一些详细的安装过程可以参考其他博客 1.制作启动盘(可以用rufus,非常方便) 2.系统分配空间,ctrl + X, 进入磁盘管理,点击想要磁盘进行压缩卷,大约100G为好。 2.重启电脑,快速按F2进入BIOS界面模式,选择Boot,将Fas
阅读全文
摘要:#include <cstring> #include <iostream> #include <algorithm> #include <queue> using namespace std; const int N = 1001010; int e[N], ne[N], head[N], tot
阅读全文
摘要:#include <iostream> using namespace std; int main() { long long int a, b, p, sum = 1; scanf("%lld%lld%lld",&a, &b, &p); sum = 1 % p; while(b) { if(b &
阅读全文
摘要:题目描述: 在字符串 s 中找出第一个只出现一次的字符。如果没有,返回一个单空格。 s 只包含小写字母。 示例: s = "abaccdeff"返回 "b" s = "" 返回 " " 程序代码 class Solution { public: char firstUniqChar(string s
阅读全文
摘要:1.将数字转化为字符串 方法1: #include<iostream> using namespace std; int main() { int n = 123; cout << to_string(n) << endl; return 0; } 方法2: #include <iostream>#
阅读全文
摘要:利用栈和stringstream将带空格的字符串逆序输出 #include <iostream> #include <sstream> #include <stack> using namespace std; int main() { string s; stack<string> q; stri
阅读全文
摘要:题目描述: 给你一个整数数组 nums 。 如果一组数字 (i,j) 满足 nums[i] == nums[j] 且 i < j ,就可以认为这是一组 好数对 。 返回好数对的数目。 示例1: 输入:nums = [1,2,3,1,1,3]输出:4解释:有 4 组好数对,分别是 (0,3), (0,
阅读全文
摘要:题目描述:给定两个数组,编写函数来计算它们的交集。 示例1:输入:nums1 = [1,2,2,1], nums2 = [2,2] 输出:[2,2]示例2:输入:nums1 = [4,9,5], nums2 = [9,4,9,8,4]输出:[4,9]1.排序方法: class Solution {
阅读全文
摘要:埃氏筛理解与代码模板 #include <iostream> #include <cstring> using namespace std; const int N = 10010; bool isprime[N]; int n, prime[N], tot; int Era_prime(int n
阅读全文
摘要:#include <iostream> using namespace std; const int N = 10010; int n, q[N], tmp[N]; void merge_sort(int q[], int l, int r) { if(l >= r) return ; int mi
阅读全文
摘要:1 #include <iostream> 2 using namespace std; 3 const int N = 10010; 4 int n, q[N]; 5 void quick_sort(int q[], int l, int r) { 6 if(l >= r) return ; 7
阅读全文

浙公网安备 33010602011771号