小小怪中式咖啡
码龄7年
关注
提问 私信
  • 博客:46,603
    46,603
    总访问量
  • 114
    原创
  • 1,386,999
    排名
  • 25
    粉丝
  • 0
    铁粉
IP属地以运营商信息为准,境内显示到省(区、市),境外显示到国家(地区)
IP 属地:山东省
  • 加入CSDN时间: 2018-02-24
博客简介:

qq_41755143的博客

查看详细资料
个人成就
  • 获得20次点赞
  • 内容获得4次评论
  • 获得40次收藏
创作历程
  • 2篇
    2020年
  • 132篇
    2019年
成就勋章
TA的专栏
  • PAT Basic Level
    94篇
  • PAT
    107篇
  • 最近
  • 文章
  • 代码仓
  • 资源
  • 问答
  • 帖子
  • 视频
  • 课程
  • 关注/订阅/互动
  • 收藏
搜TA的内容
搜索 取消

PAT(甲级)2019年冬季考试 7-1 Good in C (20分)

```scanf```无法读取空格,需要用```getline```读取空格 ```char```数组得开得大一点,这种字符串的题就应该用```string```做,不可能判断超时 最后的错误:```测试点4 运行时错误```(PAT给出的可能情况是:数组访问越界,) 数组越界,把每个数组开到```10000```即可(```测试点3:3分```)#include <bits/stdc++.h>using namespace std;char line[30][10][...
原创
发布博客 2020.09.03 ·
319 阅读 ·
0 点赞 ·
1 评论 ·
0 收藏

L2-031 深入虎穴 (25分)

测试点1(1分) 深度为0时的特判,需要将起始深度设为-1#include <bits/stdc++.h>using namespace std;vector<int> e[100010];int book[100010];int n;int maxdepth,index1;void dfs(int u,int depth){ if(depth>maxdepth){ maxdepth=depth; index1=u
原创
发布博客 2020.08.29 ·
587 阅读 ·
1 点赞 ·
0 评论 ·
1 收藏

1115 Counting Nodes in a BST (30 分)

https://pintia.cn/problem-sets/994805342720868352/problems/994805355987451904AC代码:一开始考虑错n1,n2的值,结果只得了2分,而后看大佬代码,发现问题。我用的是层次遍历,先给每层结点赋上层次值,然后再先序遍历,记录n1与n2,然后给出答案,#include <iostream>#inc...
原创
发布博客 2019.04.10 ·
296 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

1110 Complete Binary Tree (25 分)

https://pintia.cn/problem-sets/994805342720868352/problems/994805359372255232#include <iostream>#include <cstdio>#include <queue>#include <string>using namespace std;i...
转载
发布博客 2019.04.10 ·
227 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

1086 Tree Traversals Again (25 分)

AC代码:#include <iostream>#include <stack>#include <cstdio>#include <string>using namespace std;const int maxn = 35;int n;int post[maxn], in[maxn], pre[maxn];struct n...
原创
发布博客 2019.04.09 ·
222 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

1007 Maximum Subsequence Sum (25 分)

18分代码:#include <iostream>#include <vector>#include <algorithm>using namespace std;const int maxn = 10010;int A[maxn], dp[maxn];//1,2,3,-7,8情况不存在,因为1+2+3+(-7)<0,尽管-7+8>...
原创
发布博客 2019.04.07 ·
172 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

1029 Median (25 分)

22分代码(内存超限):#include <iostream>#include <cstdio>#include <algorithm>using namespace std;const int maxn = 400010;int a[maxn];int main() { int n; cin >> n; for (int...
原创
发布博客 2019.04.07 ·
326 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

1041 Be Unique (20 分)

#include <iostream>#include <cstdio>using namespace std;const int maxn = 100010;const int maxv = 10010;int a[maxv];int b[maxn];int main() { int n; cin >> n; for (int i = ...
原创
发布博客 2019.04.07 ·
384 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

1083 List Grades (25 分)

#include <iostream>#include <cstdio>#include <string>#include <algorithm>using namespace std;const int maxn = 10010;struct student { string name,id; int scr;}stu[ma...
原创
发布博客 2019.04.07 ·
238 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

1075 PAT Judge (25 分)测试点4修正

#include <iostream>#include <cstdio>#include <string>#include <algorithm>#include <vector>using namespace std;const int maxn = 10010;const int maxpro = 6;//结构体...
原创
发布博客 2019.04.07 ·
1229 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

1055 The World's Richest (25 分)

超时代码:#include <iostream>#include <cstdio>#include <string>#include <algorithm>#include <vector>using namespace std;const int maxn = 100100;struct person { str...
原创
发布博客 2019.04.06 ·
213 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

1025 PAT Ranking (25 分)

#include <iostream>#include <cstdio>#include <string>#include <algorithm>using namespace std;const int maxn = 30100;struct person { string num; int scr; int finalran...
原创
发布博客 2019.04.06 ·
163 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

1036 Boys vs Girls (25 分)

水题,以后不发自己怎么做的了。。。。。。。。。。#include <iostream>#include <string>#include <algorithm>#include <cmath>using namespace std;const int maxn = 1010;struct person { string nam...
原创
发布博客 2019.04.06 ·
214 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

Python爬取 增加用户代理和ip代理

转:https://www.cnblogs.com/zhangdaxiang/p/7681846.html解决403禁止访问:https://blog.csdn.net/jsqfengbao/article/details/44594985# -*-coding:utf-8-*-import urllib2import randomurl = "http://blog.csdn...
转载
发布博客 2019.04.01 ·
283 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

Python爬取 分析Ajax爬取B站python视频---详细资料

Flag:一天一爬虫。这篇是转的:https://blog.csdn.net/sixkery/article/details/81946308亲测有效,对转载网站的分析做进一步分析补充:分析页面:如何获取api?这次我直接打开开发者工具,切换到Network下查找api,要点击Python旁边的搜索按钮,不然Network一片空白,点击搜索之后:会在其中...
转载
发布博客 2019.04.01 ·
554 阅读 ·
0 点赞 ·
0 评论 ·
2 收藏

1012 The Best Rank (25 分)

题目链接:https://pintia.cn/problem-sets/994805342720868352/problems/994805502658068480注意点:map的value值排序,可以通过vector排序解决参考博客:https://blog.csdn.net/weixin_41168353/article/details/81203181AC代码:#inclu...
原创
发布博客 2019.03.30 ·
301 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

1010 Radix (25 分)

题目链接:https://pintia.cn/problem-sets/994805342720868352/problems/994805507225665536由于不知道radix如何取值,所以上网搜了一下,参考博客:https://blog.csdn.net/CV_Jason/article/details/80993283注意点:二分查找的边界情况(15'->25')...
转载
发布博客 2019.03.30 ·
223 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

1009 Product of Polynomials (25 分)

题目链接:https://pintia.cn/problem-sets/994805342720868352/problems/994805509540921344AC代码:关于测试点1,3#include <iostream>#include <vector>#include <algorithm>#include <cmath>...
原创
发布博客 2019.03.29 ·
390 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

1008 Elevator (20 分)

题目链接:https://pintia.cn/problem-sets/994805342720868352/problems/994805511923286016#include <iostream>#include <vector>#include <algorithm>using namespace std;int main() { ...
原创
发布博客 2019.03.29 ·
152 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

1006 Sign In and Sign Out (25 分)

题目链接:https://pintia.cn/problem-sets/994805342720868352/problems/994805516654460928AC代码:#include <iostream>#include <string>using namespace std;int main(){ int n; cin >>...
原创
发布博客 2019.03.29 ·
196 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏
加载更多