PAT(B) 1019 数字黑洞(Java)
题目链接:1019 数字黑洞 (20 point(s))分析输入正整数n后,将n转成int型数组nArr[4]用Arrays.sort(int[] a)方法将数组nArr非递减排序很显然,非递减排序得到的是最小值,非递增排序得到的是最大值不需要再用排序方法将nArr进行非递增排序,直接逆序“组合”即...
PAT 乙级 1019
题目题目地址:PAT 乙级 1019思路本题没有考虑到小于1000的情况,当小于1000的时需要给vector的向量中推入0,直到向量中有四位数字,之后再进行排序并进行相关计算代码 #include <iostream> #include <algorithm> #inclu...
PAT甲级——1033 To Fill or Not to Fill
1033 To Fill or Not to FillWith highways available, driving a car from Hangzhou to any other city is easy. But since the tank capacity of a car is lim...
PAT 甲级 1033 To Fill or Not to Fill (25 分)(贪心,误以为动态规划,忽视了油量问题)*
1033 To Fill or Not to Fill (25 分)With highways available, driving a car from Hangzhou to any other city is easy. But since the tank capacity of a car...
PAT甲级1033. To Fill or Not to Fill
PAT甲级1033. To Fill or Not to Fill题意:有了高速公路,从杭州到任何其他城市开车很容易。但由于一辆汽车的坦克容量有限,我们不得不在不时地找到加油站。不同的加油站可能会给不同的价格。您被要求仔细设计最便宜的路线。输入规格:每个输入文件包含一个测试用例。对于每种情况,第一行...
PAT 1033 To Fill or Not to Fill[dp]
1033 To Fill or Not to Fill(25 分)With highways available, driving a car from Hangzhou to any other city is easy. But since the tank capacity of a car ...
PAT (Basic Level) Practise (中文)- 1014. 福尔摩斯的约会 (20)
http://www.patest.cn/contests/pat-b-practise/10141014. 福尔摩斯的约会 (20)时间限制50 ms内存限制65536 kB代码长度限制8000 B判题程序Standard作者CHEN, Yue大侦探福尔摩斯接到一张奇怪的字条:“我们约会吧! 34...
【PAT】1014. 福尔摩斯的约会 (20)
1014. 福尔摩斯的约会 (20)大侦探福尔摩斯接到一张奇怪的字条:“我们约会吧! 3485djDkxh4hhGE 2984akDfkkkkggEdsb s&hgsfdk d&Hyscvnm”。大侦探很快就明白了,字条上奇怪的乱码实际上就是约会的时间“星期四 14:04”,因为前面...
PAT乙级:1014 福尔摩斯的约会 (20分)
PAT乙级:1014 福尔摩斯的约会 (20分)题干大侦探福尔摩斯接到一张奇怪的字条:我们约会吧! 3485djDkxh4hhGE 2984akDfkkkkggEdsb s&hgsfdk d&Hyscvnm。大侦探很快就明白了,字条上奇怪的乱码实际上就是约会的时间星期四 14:04,...
浙江大学PAT上机题解析之1014. 福尔摩斯的约会 (20)
1014. 福尔摩斯的约会 (20)时间限制 50 ms 内存限制 32000 kB 代码长度限制 8000 B 判题程序 Standard 作者 CHEN, Yue大侦探福尔摩斯接到一张奇...
PAT 乙级 1014 福尔摩斯的约会 (20) C++版
1014. 福尔摩斯的约会 (20)时间限制100 ms内存限制65536 kB代码长度限制8000 B判题程序Standard作者CHEN, Yue大侦探福尔摩斯接到一张奇怪的字条:“我们约会吧! 3485djDkxh4hhGE 2984akDfkkkkggEdsb s&hgsfdk d&...
PAT 1014. 福尔摩斯的约会 (20)
大侦探福尔摩斯接到一张奇怪的字条:“我们约会吧! 3485djDkxh4hhGE 2984akDfkkkkggEdsb s&hgsfdk d&Hyscvnm”。大侦探很快就明白了,字条上奇怪的乱码实际上就是约会的时间“星期四 14:04”,因为前面两字符串中第1对相同的大写英文字母(...
PAT——1014. 福尔摩斯的约会
大侦探福尔摩斯接到一张奇怪的字条:“我们约会吧! 3485djDkxh4hhGE 2984akDfkkkkggEdsb s&hgsfdk d&Hyscvnm”。大侦探很快就明白了,字条上奇怪的乱码实际上就是约会的时间“星期四 14:04”,因为前面两字符串中第1对相同的大写英文字母(...
PAT乙级 1014. 福尔摩斯的约会 (20)
1014. 福尔摩斯的约会 (20)时间限制100 ms内存限制65536 kB代码长度限制8000 B判题程序Standard作者CHEN, Yue大侦探福尔摩斯接到一张奇怪的字条:“我们约会吧! 3485djDkxh4hhGE 2984akDfkkkkggEdsb s&hgsfdk d&...
PAT1129:Recommendation System
1129. Recommendation System (25)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueRecommendation system predicts the preference that a user wo...
PAT甲题题解-1056. Mice and Rice (25)-模拟题
有n个老鼠,第一行给出n个老鼠的重量,第二行给出他们的顺序。1.每一轮分成若干组,每组m个老鼠,不能整除的多余的作为最后一组。2.每组重量最大的进入下一轮。让你给出每只老鼠最后的排名。很简单,用两个数组模拟一下即可order1存储进入当前一轮老鼠的索引顺序order2存储进入下一轮老鼠的索引顺序如果...
PAT 甲级 1010 Radix
https://pintia.cn/problem-sets/994805342720868352/problems/994805507225665536Given a pair of positive integers, for example, 6 and 110, can this equat...
PAT (Advanced Level) 1008. Elevator (20)
简单模拟。注意a[i]==a[i-1]的情况。#include<iostream>#include<cstring>#include<cmath>#include<algorithm>#include<cstdio>#include<...
PAT 1138 Postorder Traversal [比较]
1138 Postorder Traversal (25 分)Suppose that all the keys in a binary tree are distinct positive integers. Given the preorder and inorder traversal seq...
PAT 乙级 1080 MOOC期终成绩 (25 分)
1080 MOOC期终成绩 (25 分)对于在中国大学MOOC(http://www.icourse163.org/ )学习“数据结构”课程的学生,想要获得一张合格证书,必须首先获得不少于200分的在线编程作业分,然后总评获得不少于60分(满分100)。总评成绩的计算公式为 G=(Gmid−ter...