PAT 2019-3 7-2 Anniversary】的更多相关文章

考试的还行.不过略微有点遗憾,但是没想到第一题会直接上排序和dfs,感觉这次的题目难度好像是倒着的一样.哈哈哈哈. 第一题实在是搞崩心态,这道题给我的感觉是,可以做,但事实上总是差点啥. 第二题,第三题,把我的心态稳住了,不然的话这次考试可能会雪崩.这两道题目都是提交一次,直接全红. 接着二三题带来的信心把第四题搞定了,好像提交了两次. 然后就又开始死磕第一题,关键是当时自己以为第一题不应该用dfs,就一直在修改细节.╮(╯▽╰)╭,还是超时. 感觉PAT不算很难,但是在新的环境.计时.排队提交…
算是第二次做这套题吧,感觉从上次考试到现在自己有了挺大提高,提前30min做完了. 7-1 Sexy Primes 读懂题意就行. #include <cstdio> #include <iostream> #include <cmath> #include <algorithm> #include <vector> using namespace std; bool isPrime(int n) { ) return false; int tm…
Zhejiang University is about to celebrate her 122th anniversary in 2019. To prepare for the celebration, the alumni association (校友会) has gathered the ID’s of all her alumni. Now your job is to write a program to count the number of alumni among all…
2019 秋季 PAT (Advanced Level) C++题解 考试拿到了满分但受考场状态和知识水平所限可能方法不够简洁,此处保留记录,仍需多加学习.备考总结(笔记目录)在这里 7-1 Forever (20 分) "Forever number" is a positive integer A with K digits, satisfying the following constrains: the sum of all the digits of A is m; the…
2019 秋季 PAT 甲级 备考总结 在 2019/9/8 的 PAT 甲级考试中拿到了满分,考试题目的C++题解记录在这里,此处对备考过程和考试情况做一个总结.如果我的方法能帮助到碰巧点进来的有缘人那就更好了Orz 目录 一.备考内容 1.  <算法笔记>(←阅读内容目录在这里) 2. PAT 题库刷题 3. 题型总结 + 刷题笔记 (←笔记目录在这里) 二.考试情况 1. 考前准备 2. 考试过程 3. 对这次考试的总结(碎碎念,可忽略) 一.备考内容 1.  <算法笔记>…
Description: Zhejiang University is about to celebrate her 122th anniversary in 2019. To prepare for the celebration, the alumni association (校友会) has gathered the ID's of all her alumni. Now your job is to write a program to count the number of alum…
PAT甲级考前整理一:https://www.cnblogs.com/jlyg/p/7525244.html,主要讲了131题的易错题及坑点 PAT甲级考前整理二:https://www.cnblogs.com/jlyg/p/10364696.html,主要讲了考前注意以及一些常用算法. 1132题:用字符串接收会毕竟快,使用atoi函数转成数字,注意a*b会超出int32. #include<iostream> #include<cstdio> #include<set&g…
PAT甲级考前整理之一网址:https://www.cnblogs.com/jlyg/p/7525244.html,主要总结了前面131题的类型以及易错题及坑点. PAT甲级考前整理三网址:https://www.cnblogs.com/jlyg/p/10364727.html主要是讲132题开始的题目. 考前注意: 1.写函数(有返回值的函数)容易忘记返回值,可能本地运行没问题,但是提交了就会有问题. 2.不要把strlen()函数写到for.while的循环中,有时候会超时,最好是 int…
   转载请注明出处:https://www.cnblogs.com/jlyg/p/7525244.html 终于在考前,刷完PAT甲级131道题目,不容易!!!每天沉迷在刷题之中而不能超脱,也是一种境界.PAT甲级题目总的说卡题目的比较多,卡测试点的比较少,有些题目还会有题意混淆,这点就不吐槽了吧.静下心来耍这130道题,其实磨练的是一种态度与手感,养成的是一种习惯.热爱AC没有错!!(根据自己的刷题情况持续更新中,这次是第二遍刷了,发现换了新网站后,oj严格很多了,有些之前可以过的,现在已经…
7-1 Sexy Primes 判断素数 一个点没过17/20分 错因:输出i-6写成了输出i,当时写的很乱,可以参考其他人的写法 #include<bits/stdc++.h> using namespace std; const int maxn = 1e8; typedef long long ll; int n; bool isprime(ll x){ if(x == 0 || x==1 || x==2) return false; for(ll i=2;i<=sqrt(x);i…