自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(57)
  • 收藏
  • 关注

原创 AI夏令营第三期 - 基于论文摘要的文本分类与关键词抽取挑战赛笔记

pycharm,Image Downloader

2023-08-18 20:45:24 209 2

原创 用pycharm运行Image Downloader时遇到的问题

pycharm,Image Downloader

2023-02-06 23:11:03 135 1

原创 PAT A1059

1059 Prime Factors (25 分)Given any positive integer N, you are supposed to find all of its prime factors, and write them in the format N = p1​k1​×p2​k2​×⋯×pm​km​.Input Specification:Each input file contains one test case which gives a

2022-03-08 21:37:15 97

原创 PAT A1069

1069 The Black Hole of Numbers (20 分)For any 4-digit integer except the ones with all the digits being the same, if we sort the digits in non-increasing order first, and then in non-decreasing order, a new number can be obtained by taking the second numbe

2022-03-05 21:17:00 60

原创 PAT A1101

1101 Quick Sort (25 分)There is a classical process named partition in the famous quick sort algorithm. In this process we typically choose one element as the pivot. Then the elements less than the pivot are moved to its left and those larger than the pivo

2022-03-05 20:46:39 68

原创 PAT A1093

1093 Count PAT’s (25 分)The string APPAPT contains two PAT’s as substrings. The first one is formed by the 2nd, the 4th, and the 6th characters, and the second one is formed by the 3rd, the 4th, and the 6th characters.Now given any string, you are suppose

2022-02-24 19:55:09 110

原创 PAT A1044

#includeint m,n,sum[100010],fr[100010],ed[100010],tsum=100000010;int bS(int i,int right,int tm){int left=i;int mid;while(left<right){mid=(left+right)/2;if(sum[mid]-sum[i]>=m)right=mid;elseleft=mid+1; }return left;}//最终结束时,right=left+1=m

2022-02-22 22:30:17 43

原创 PAT A1010

1010 Radix (25 分)Given a pair of positive integers, for example, 6 and 110, can this equation 6 = 110 be true? The answer is yes, if 6 is a decimal number and 110 is a binary number.Now for any pair of positive integers N1​and N2​, your task is to

2022-02-19 18:25:39 104

原创 PAT A1085

1085 Perfect Sequence (25 分)Given a sequence of positive integers and another positive integer p. The sequence is said to be a perfect sequence if M≤m×p where M and m are the maximum and minimum numbers in the sequence, respectively.Now given a sequence

2022-02-16 15:48:58 113

原创 PAT A1060 小细节考虑清

1060 Are They Equal (25 分)If a machine can save only 3 significant digits, the float numbers 12300 and 12358.9 are considered equal since they are both saved as 0.123×105with simple chopping. Now given the number of significant digits on a machine and t

2022-02-13 17:42:35 169

原创 PAT A1038

1038 Recover the Smallest Number (30 分)Given a collection of number segments, you are supposed to recover the smallest number from them. For example, given { 32, 321, 3214, 0229, 87 }, we can recover many numbers such like 32-321-3214-0229-87 or 0229-32-8

2022-02-11 20:30:07 52

原创 PAT A1067

1067 Sort with Swap(0, i) (25 分)Given any permutation of the numbers {0, 1, 2,…, N−1}, it is easy to sort them in increasing order. But what if Swap(0, *) is the ONLY operation that is allowed to use? For example, to sort {4, 0, 2, 1, 3} we may apply the

2022-02-10 22:48:12 175

原创 PAT A1037

1037 Magic Coupon (25 分)The magic shop in Mars is offering some magic coupons. Each coupon has an integer N printed on it, meaning that when you use this coupon with a product, you may get N times the value of that product back! What is more, the shop als

2022-02-10 15:11:44 39

原创 PAT A1033 有难度

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 is limited, we have to find gas stations on the way from time to time. Different gas station may give di

2022-02-09 19:00:57 459

原创 PAT A1012

1012 The Best Rank (25 分)To evaluate the performance of our first year CS majored students, we consider their grades of three courses only: C - C Programming Language, M - Mathematics (Calculus or Linear Algrbra), and E - English. At the mean time, we enc

2022-02-06 19:07:16 134

原创 codeup100000583(4

问题 D: 八皇后[命题人 : 外部导入]时间限制 : 1.000 sec 内存限制 : 32 MB题目描述会下国际象棋的人都很清楚:皇后可以在横、竖、斜线上不限步数地吃掉其他棋子。如何将8个皇后放在棋盘上(有8 * 8个方格),使它们谁也不能被吃掉!这就是著名的八皇后问题。对于某个满足要求的8皇后的摆放方法,定义一个皇后串a与之对应,即a=b1b2…b8,其中bi为相应摆法中第i行皇后所处的列数。已经知道8皇后问题一共有92组解(即92个不同的皇后串)。给出一个数b,要求输出第b个串。串的比

2022-02-06 19:06:23 67

原创 codeup100000583(3

问题 C: 神奇的口袋[命题人 : 外部导入]时间限制 : 1.000 sec 内存限制 : 32 MB题目描述有一个神奇的口袋,总的容积是40,用这个口袋可以变出一些物品,这些物品的总体积必须是40。John现在有n个想要得到的物品,每个物品的体积分别是a1,a2……an。John可以从这些物品中选择一些,如果选出的物体的总体积是40,那么利用这个神奇的口袋,John就可以得到这些物品。现在的问题是,John有多少种不同的选择物品的方式。输入输入的第一行是正整数n (1 <= n &l

2022-02-04 21:22:18 51

原创 codeup10000183(2)

问题 B: 数列[命题人 : 外部导入]时间限制 : 1.000 sec 内存限制 : 32 MB题目描述编写一个求斐波那契数列的递归函数,输入n 值,使用该递归函数,输出如下图形(参见样例)。输入输入第一行为样例数m,接下来有m行每行一个整数n,n不超过10。输出对应每个样例输出要求的图形(参见样例格式)。样例输入 Copy16样例输出 Copy00 1 10 1 1 2 30 1 1 2 3 5 80 1 1 2 3 5 8 13 210 1 1 2 3 5 8 1

2022-02-04 19:40:19 471

原创 codeup100000583(1)

#include<cstdio>int count=0;int f(int n){ if(n==1) { return 1; } if(n==2) { return 2; } return f(n-1)+f(n-2); }int main(){ int n; while(scanf("%d",&n)!=EOF) { printf("%d\n",f(n)); } return 0;}

2022-02-04 19:39:39 382

原创 PAT A1048

1048 Find Coins (25 分)Eva loves to collect coins from all over the universe, including some other planets like Mars. One day she visited a universal shopping mall which could accept all kinds of coins as payments. However, there was a special requirement

2022-02-02 21:47:18 265

原创 PAT A1050

1050 String Subtraction (20 分)Given two strings S1​and S2​, S=S1​−S2​is defined to be the remaining string after taking all the characters in S2​from S1​. Your task is simply to calculate S1​−S2​for any given strings. However, it m

2022-02-02 16:12:53 382

原创 PAT A1041

1041 Be Unique (20 分)Being unique is so important to people on Mars that even their lottery is designed in a unique way. The rule of winning is simple: one bets on a number chosen from [1,104]. The first one who bets on a unique number wins. For example

2022-02-02 15:52:19 348

原创 PAT A1092

1092 To Buy or Not to Buy (20 分)Eva would like to make a string of beads with her favorite colors so she went to a small shop to buy some beads. There were many colorful strings of beads. However the owner of the shop would only sell the strings in whole

2022-01-31 19:22:58 442

原创 PAT A1084

1084 Broken Keyboard (20 分)On a broken keyboard, some of the keys are worn out. So when you type some sentences, the characters corresponding to those keys will not appear on screen.Now given a string that you are supposed to type, and the string that yo

2022-01-31 18:09:31 187

原创 PAT A1095 map应用

#include#include#include#include#include//string 类型所需using namespace std;struct car{char id[8];int time;char status[6];} all[10010],vaild[10010];int timechange(int h,int m,int s){return h3600+m60+s;}bool idorder(car a,car b){if(strcmp(a.id

2022-01-24 19:21:33 138

原创 PAT A1080

1080 Graduate Admission (30 分)It is said that in 2011, there are about 100 graduate schools ready to proceed over 40,000 applications in Zhejiang Province. It would help a lot if you could write a program to automate the admission procedure.Each applican

2021-11-14 14:16:02 39

原创 PAT A1083

1083 List Grades (25 分)Given a list of N student records with name, ID and grade. You are supposed to sort the records with respect to the grade in non-increasing order, and output those student records of which the grades are in a given interval.Input S

2021-11-13 20:30:33 34

原创 PAT A1075

1075 PAT Judge (25 分)The ranklist of PAT is generated from the status list, which shows the scores of the submissions. This time you are supposed to generate the ranklist for PAT.Input Specification:Each input file contains one test case. For each case,

2021-11-12 16:17:49 73

原创 PAT A1055 超时可以缩小查询数组

1055 The World’s Richest (25 分)Forbes magazine publishes every year its list of billionaires based on the annual ranking of the world’s wealthiest people. Now you are supposed to simulate this job, but concentrate only on the people in a certain range of

2021-11-09 22:15:50 50

原创 PAT A1028

1028 List Sorting (25 分)Excel can sort records according to any column. Now you are supposed to imitate this function.Input Specification:Each input file contains one test case. For each case, the first line contains two integers N (≤105) and C, where

2021-11-09 12:05:31 36

原创 PAT A1016

1016 Phone Bills (25 分)A long-distance telephone company charges its customers by the following rules:Making a long-distance call costs a certain amount per minute, depending on the time of day when the call is made. When a customer starts connecting a l

2021-11-07 17:58:23 76

转载 浮点数相加 精度问题 配合PAT A1016食用

来自:掘金,作者:红尘炼心前言去互联网金融或电商行业的公司面试时,一般都会遇类似“ 0.1+0.2 等于 0.3吗?”这道题,对于非科班出身的前端人是一道送命题,有些知道 0.1+0.2 不等于 0.3,但是继续深问为什么,就无法很清晰地回答。本专栏总结一下回答 0.1+0.2 不等于 0.3 的思路,在回答之前要先弄清楚 0.1+0.2 的计算过程。0.1+0.2 的计算过程计算过程1、十进制转成二进制在JS内部所有的计算都是以二进制方式计算的。所以运算 0.1+ 0.2 时要先把 0.1和

2021-11-07 17:44:36 238

原创 PAT A1062

1062 Talent and Virtue (25 分)About 900 years ago, a Chinese philosopher Sima Guang wrote a history book in which he talked about people’s talent and virtue. According to his theory, a man being outstanding in both talent and virtue must be a “sage(圣人)”; b

2021-11-02 21:00:47 90

原创 2021-10-31

1082 Read Number in Chinese (25 分)Given an integer with no more than 9 digits, you are supposed to read it in the traditional Chinese way. Output Fu first if it is negative. For example, -123456789 is read as Fu yi Yi er Qian san Bai si Shi wu Wan liu Qia

2021-10-31 20:12:18 93

原创 PAT A1005

1005 Spell It Right (20 分)Given a non-negative integer N, your task is to compute the sum of all the digits of N, and output every digit of the sum in English.Input Specification:Each input file contains one test case. Each case occupies one line which

2021-10-21 20:59:24 32

原创 PAT A1001

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).Input Specification:Each input file contains one test case. Each ca

2021-10-21 20:22:48 34

原创 PAT A1073

1073 Scientific Notation (20 分)Scientific notation is the way that scientists easily handle very large numbers or very small numbers. The notation matches the regular expression [±][1-9].[0-9]+E[±][0-9]+ which means that the integer portion has exactly on

2021-10-19 22:30:22 35

原创 PAT A1061

1061 Dating (20 分)Sherlock Holmes received a note with some strange strings: Let’s date! 3485djDkxh4hhGE 2984akDfkkkkggEdsb s&hgsfdk d&Hyscvnm. It took him only a minute to figure out that those strange strings are actually referring to the coded

2021-10-14 22:02:11 59

原创 PAT A1058

1058 A+B in Hogwarts (20 分)If you are a fan of Harry Potter, you would know the world of magic has its own currency system – as Hagrid explained it to Harry, “Seventeen silver Sickles to a Galleon and twenty-nine Knuts to a Sickle, it’s easy enough.” Your

2021-10-12 22:12:35 92

原创 PAT A1027

1027 Colors in Mars (20 分)People in Mars represent the colors in their computers in a similar way as the Earth people. That is, a color is represented by a 6-digit number, where the first 2 digits are for Red, the middle 2 digits for Green, and the last 2

2021-10-12 21:58:58 27

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除