打赏

相关文章

A1016(25)

很考察耐心的一道题,写起来也不是很复杂,耐心去做肯定是能写出来的啦 下面介绍一下auto的用法,比如,int或者double,我们可以写成,int i0;double k0.0,那么auto相当于我没有指代这个究…

PAT a1126

目的:判断是否是Eulerian Path 输入: 每个点 每个边 输出: 判断是哪种情况 算法: 用hash表统计每个点的度。如果全为偶数,则为Eulerian 如果有两个点的度为奇数,则为semi-Eulerian 如果不是以上的…

PAT A1128

AC代码如下 #include <iostream> #include <cmath>using namespace std;const int max_k210; int output[max_k]{0}; const int max_n1100; int queen[max_n]{0};bool is_solution(int n,int a[]){for(int i 0; i < n -1 ;i){for(int j i1 ; j < n ;j){if…

解决macbook pro在只有win8系统下开启AHCI的问题

背景&#xff1a; 我的macbook pro换了一块SSD&#xff0c;只安装了win8系统&#xff0c;但是因为没有开启AHCI导致系统速度严重降低&#xff0c;没错&#xff0c;是严重降低&#xff0c;因为macbook在os x系统下才会自动开启AHCI&#xff0c;所以下定决心搞定它。 所需工具&a…

A1066

没写出&#xff0c;平衡二叉树需要多练多思考多画图. 注意点&#xff1a; 1、有可能并不是根结点的左右子树未平衡&#xff0c;遇到这种情况时&#xff0c;做平衡操作后&#xff0c;需要让该节点的父亲结点指向更新后的孩子结点&#xff0c;以保证树中间不断掉. 通过它们实现&a…

PAT A1068

题目&#xff1a;https://pintia.cn/problem-sets/994805342720868352/problems/994805402305150976 我自己没编出来。我的思路是数组从小到大排序&#xff0c;然后算dp[i][j]&#xff08;第i位最大量为j的钱&#xff09;&#xff0c;得到dp后遍历所有dp[i]&#xff0c;找dp[i…

A1065 A+B and C (64bit)

1065 AB and C (64bit) &#xff08;20 分) Given three integers A, B and C in [−​​,], you are supposed to tell whether AB>C. Input Specification: The first line of the input gives the positive number of test cases, T (≤10). Then T test cases follow…

PAT a1128

目的:判断是不是Queens Puzzle 输入&#xff1a; K 例子个数&#xff0c;[1 200] N 图片大小&#xff0c;[4 1000] 输出&#xff1a; 是的输出&#xff0c;YES 不是输出&#xff0c;NO 算法&#xff1a; 不在一行好判断&#xff0c;不在一条斜线上&#xff0c;在一条…

手机版浏览

扫一扫体验

微信公众账号

微信扫一扫加关注

返回
顶部