- 博客(20)
- 收藏
- 关注
原创 使用KMS激活WINDOWS10后Chrome浏览器主页被强制篡改
使用KMS激活WINDOWS10后Chrome浏览器主页被强制篡改背景1、使用杀毒软件查杀2、排查注册表3、清理浏览器4、排查快捷方式5、排查系统运行的进程6、找到的方法 背景 换了个新主板,本来不 用激活的Windows又要激活了,在网上随便下了一个KMS,傻傻地关掉杀安全软件进行激活后,发现还不是永久的,只有180天,本来想想算了。但激活后一打开平时用的Chrome,发现网页被劫持。极不甘心,试了一系列方法最后搞定,下面我简单讲讲解决的过程。 1、使用杀毒软件查杀 我个人觉得杀毒软件大部时候没什么用,所
2020-06-25 01:21:36 8774 14
原创 PAT A 1114. Family Property (25)
#include #include #include using namespace std; /*可用DFS解决,图结点可对于每一个人建立一个结点,房子套数和总面积可初始为0,使用链表法进行建图。然后再进行DFS,每个连通域作为一个家庭。*/ struct person{//存储每个人的信息 int no; vector fmembers; double set=0.0,area=0
2017-08-30 17:42:54 234
原创 PAT A 1112. Stucked Keyboard (20)
字符串的题,不难,但粗心就容易错。要注意题目的意思,其中有一段“The stucked key will always repeat output for a fixed k times whenever it is pressed”,意思就是说卡住的键是每被敲一次是100%会出现k个对应字符的,例如k=3时,对于”eeeeee"来讲,e就是被卡住了,原串为“ee",但对于”eeeee"来讲,e就
2017-08-30 16:14:49 175
原创 PAT A 1107. Social Clusters (30)
这个是个图的题目,不过并不是个典型的图的数据结构,主要考的就是数据结构的建立,只要建模的方式选得恰当算法主体就是很简单的一个DFS,可用并查集,但我没用。pl[I]里面存放的都是拥有ith-hobby的所有人的序号,hby[j]里面存的是对于jth人,其所有的hobby序号。关键在于本题所定义的连通图是为所有找拥有部分共同爱好的人都在一个cluster里面,即不要求cluster里面所有的人都有同一个hobby,例如样例中第二个cluster人数为3,因为第3个人和第5个人共有3th-hobby,而第7个人
2017-08-29 16:46:01 244
原创 PAT A 1106. Lowest Price in Supply Chain (25)
类似的题这是第三个了吧,很简单。可以用BFS,也可以用DFS,我用的DFS。 #include #include #include using namespace std; vector child[100002]; const double INF=pow(10,10); double minp=INF; int minnum=0; void DFS(const int &roo
2017-08-25 17:00:14 148
原创 PAT A 1105. Spiral Matrix (25)
//其实就是个排版题,注意好跳出循环的条件就好 #include #include #include using namespace std; int seq[10000]={0}; int matrix[10000][100]={0}; void matrix_size(const int &N,int &m,int &n){ m=(int)sqrt(N); while(N%m)
2017-08-22 21:39:10 220 1
原创 PAT A 1104. Sum of Number Segments (20)
这就是个数学题,很简单。 #include using namespace std; double seq[100004]={0.0}; double sum_of_seg(const int &n){ double sum=0.0; for(int i=0;i<n;++i){ sum+=seq[i]*(n-i)*(i+1); } return sum; } int mai
2017-08-22 20:36:15 157
原创 PAT A 1102. Invert a Binary Tree (25)
用静态链表建树,然后只要交换两个元素的值就反转了。 #include #include #include #include #include #include using namespace std; vector child[11],bfs,infs; bool root[11]={false}; queue Q; void invert(const int &n){ for
2017-08-22 00:08:23 153
原创 PAT A 1101. Quick Sort (25)
#include #include #include using namespace std; set res; struct node{ long long key,nowmax; void larger(long long &n){//检查当前元素左侧的元素是否都比此元素小,同时更新当前序列的最大值 if(n>key){ nowmax=n; } else {
2017-08-22 00:03:42 137
原创 PAT A 1100. Mars Numbers (20)
对于13,26这种数,只应该输出“tam”和“hel”,不应该输出“tam tret”和“hel tret”。 #include #include #include #include using namespace std; string gewei[]={ "tret","jan", "feb", "mar", "apr", "may", "jun", "jly", "aug",
2017-08-22 00:00:02 137
原创 PAT A 1082. Read Number in Chinese (25)
这个题不难,只是很麻烦。 #include #include #include using namespace std; string shuzi[]={ "ling","yi","er","san","si", "wu","liu","qi","ba","jiu" }; string danwei[]{ "","Shi","Bai","Qian" }; int main(vo
2017-08-21 23:56:28 138
原创 PAT A 1098. Insertion or Heap Sort (25)
和之前一个排序题差不多。不过要注意堆排列时元素序号最好从1开始,此外插入排序起始序号要从第三个元素开始。#include #include using namespace std; int ori[102],comp[102],tmpo[102]; bool insertsort(const int &n){ bool flag=false; for(int i=3;i<=n&&!fl
2017-08-21 23:50:27 127
原创 PAT A 1097. Deduplication on a Linked List (25)
给出的结点可能会有多余的无用结点。 #include #include #include #include using namespace std; struct node{ int addr,key,next; node()=default; void assign(const int &x,const int &k,const int &y){ addr=x,key=k,
2017-08-21 23:46:27 182
原创 PAT A 1096. Consecutive Factors (20)
#include #include using namespace std; int main(void){ int n,len=0,first=2; scanf("%d",&n); double max=sqrt(n);//枚举法,一个数的质因子要么全都少于此数的平方根,要么至多有一 for(int i=2;i<=max;++i){//个大于此数的平方根,所以遍历只需要到这就够了
2017-08-21 23:41:01 160
原创 PAT A 1095. Cars on Campus (30)
总有一个超时的。 #include #include #include #include #include #include #include using namespace std; struct inandout{ string intime,outtime,parktime; void compute(){ string shh(intime,0,2),smm(
2017-08-21 23:38:13 287
原创 PAT A 1094. The Largest Generation (25)
就是很简单的树的层次遍历。 #include #include #include using namespace std; vector child[100]; queue q; void BFS(int &max,int &maxlevel){ int p=1,level=1,end=1; max=1,maxlevel=1; while(!q.empty())q.pop();
2017-08-21 23:16:16 145
原创 PAT A 1115. Counting Nodes in a BST (30)
只要是树的题都不会很难,简单的建立排序树,再层次遍历。 测试点5通不过是因为未考虑只有一个结点的情况。 #include #include #include #include using namespace std; struct node{ int key; node *lchild,*rchild; }; int keys[1002]={0}; int levelnode[
2017-08-21 23:08:39 248
原创 PAT A1092. To Buy or Not to Buy (20)
时间要求高,暴力法可能会超时,考虑使用map建立hash表记录原字符串中各字符出现次数。#include #include #include #include using namespace std; map shop; int main(void){ //freopen("in.log","r",stdin); string a,b; cin>>a>>b; for(char
2017-08-17 22:25:38 138
原创 PAT A1093
使用两个树状数组,其中一个保存A左侧P的个数,一个保存从一个A到下一个A之间的T的个数。#include #include #include using namespace std; struct tarr{ int no,times; tarr()=default; void assign(int i,int t){ no=i,times=t; } };//定义树状数组结点,
2017-08-17 22:09:19 151
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人