- 博客(6)
- 收藏
- 关注
原创 PAT(甲级)2019年冬季考试 7-4 Cartesian Tree (30 分)
A Cartesian tree is a binary tree constructed from a sequence of distinct numbers. The tree is heap-ordered, and an inorder traversal returns the original sequence. For example, given the sequence { 8, 15, 3, 4, 1, 5, 12, 10, 18, 6 }, the min-heap Cartesia
2021-03-09 18:11:36 143
原创 PAT(甲级)2019年冬季考试 7-1 Good in C (20 分)
When your interviewer asks you to write “Hello World” using C, can you do as the following figure shows?Input Specification:Each input file contains one test case. For each case, the first part gives the 26 capital English letters A-Z, each in a 7×5 matr
2021-03-09 18:02:06 125
原创 PAT (Advanced Level) Practice 1011 World Cup Betting (20分)
PAT (Advanced Level) Practice 1011 World Cup Betting (20分)With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excited as the best players from the best teams doing battles for the World Cup trophy in South Africa.
2021-02-02 11:32:17 107
原创 PAT (Basic Level)B1072 开学寄语 (20分)
PAT (Basic Level)B1072 开学寄语 (20分)#include<iostream>#include<cstring>using namespace std;int hashTable[10000]={0};int main(){ int m,n,temp,pcnt=0,count=0,cnt; cin>>m>>n; //需要检查的学生人数 被禁止的物品数 int a[m]; string s[m]; f
2021-01-27 15:31:12 93
原创 PAT (Basic Level) B1070 结绳 (25分)
PAT (Basic Level) B1070 结绳 (25分)思路: 保证越长的绳子对折的次数越少#include<vector>#include<iostream>#include<algorithm>using namespace std;int cmp(int a,int b){ return a<b;}int main(){ int n,len=0; cin>>n; vector<int > v(n);
2021-01-27 15:04:02 50
原创 PTA 乙级 B1069 微博转发抽奖 (20分)
1069 微博转发抽奖 (20分)#include<stdio.h>#include<iostream>#include<cstring>using namespace std;int main(){ int m,n,s; int count=0; int cnt=0; cin>>m>>n>>s; string temp; bool flag=false; map<string,int > m
2021-01-27 14:38:34 123
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人