- 博客(8)
- 收藏
- 关注
原创 PAT 1136 stoi产生的错误
写这道题时都使用了现成的函数,stoi(),to_string()等,但是这样一直有两个测试点显示运行时错误。最后排查出发现是stoi这个函数(to_string没测估计也有问题),基本上是因为题目中说过最大数据为1000位,所以这个函数就出错了。只适用于较小的数据吧。代码:#include<iostream>#include<stdio.h>#include<...
2020-03-14 10:49:11 364
原创 PAT 1022
提交以后错了最后两个测试点:更改后发现最后两组数据的id小于7位数,或者有前导0,所以输出的时候要按照“%07d"格式。也接着上一题学到的stringstream成功分割了keyword中的字符串,简洁了很多在这里插入代码片#include<iostream>#include<stdio.h>#include<stdlib.h>#include<...
2020-03-01 21:29:57 150
原创 PAT 1071
PAT 1071错误点:没有处理最后一个单词。在对整行字符串处理时,如果最后一个单词为有效字符,那么就没有对他放入map操作而是直接结束放入map的所有过程开始遍历找最大了。所以需要在while结束后对最后一个单词进行补充处理。#include<iostream>#include<stdio.h>#include<stdlib.h>#include&l...
2020-03-01 18:37:50 138
原创 PAT 甲级 A1098
主要讲错误点:算法笔记给出的一组用例:43 4 2 13 4 2 1//ouputInsertion Sort2 3 4 1可以用来检查自己的匹配插入排序的函数是否正确。有没有正确的处理初始序列和中间序列一致的情况。代码如下:#include<iostream>#include<stdio.h>#include<stdlib.h>#i...
2020-02-07 15:54:22 186
原创 WDAGUtilityAccount和defaultaccount
cmd 里 net user 发现了几个奇怪的账户,百度了都没有,就写在这儿了。WDAGUtilityAccount: 如果您在日志解决方案中看到为用户名创建的新本地帐户的警报:WDAGUtilityAccount(事件ID 4720或4722)。此帐户是Windows Defender Application Guard的一部分,它包含在RS3(aka windows 10 fall ...
2018-09-10 20:51:26 15045 1
原创 PAT_1003
PAT_1003 EmergencyAs an emergency rescue team leader of a city, you are given a special map of your country. The map shows several scattered cities connected by some roads. Amount of rescue teams ...
2018-04-03 23:36:11 94
原创 PAT_1002
1002. A+B for Polynomials (25)This time, you are supposed to find A+B where A and B are two polynomials.InputEach input file contains one test case. Each case occupies 2 lines, and each line contains ...
2018-03-28 10:39:56 135
原创 PAT_1001
1001. A+B Format (20)Calculate a + b and output the sum in standard format -- that is, the digits must be separated into groups of three by commas (unless there are less than four digits).InputEach in...
2018-03-27 03:29:13 150
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人