首页 > TAG信息列表 > 1147

1147 简单评委打分

题目描述 某学生参加项目结题汇报,假设有8位老师作为评委。计算学生最终得分的方法如下:首先去掉一个最高分和一个最低分,然后计算剩余6个分数的平均值,所得结果就是该学生的最后得分。编程实现此功能。 输入要求 先从键盘输入8个分数。 输出要求 去掉一个最高分和一个最低分后计

#1147. Heaps【完全二叉树 + 堆】

原题链接 Problem Description: In computer science, a heap is a specialized tree-based data structure that satisfies the heap property: if P is a parent node of C, then the key (the value) of P is either greater than or equal to (in a max heap) or less tha

1147 Heaps (30 分)--PAT甲级(判断堆),写完这题心态有点小崩

In computer science, a heap is a specialized tree-based data structure that satisfies the heap property: if P is a parent node of C, then the key (the value) of P is either greater than or equal to (in a max heap) or less than or equal to (in a min heap)

[LeetCode] 1147. Longest Chunked Palindrome Decomposition 段式回文

You are given a string text. You should split it to k substrings (subtext1, subtext2, ..., subtextk) such that: subtexti is a non-empty string. The concatenation of all the substrings is equal to text (i.e., subtext1 + subtext2 + ... + subtextk 

信息学奥赛一本通 1147:最高分数的学生姓名 | OpenJudge NOI 1.9 02

【题目链接】 ybt 1147:最高分数的学生姓名 OpenJudge NOI 1.9 02:输出最高分数的学生姓名 【题目考点】 1. 结构体 2. 求最大值下标 【题解代码】 解法1:用结构体 设表示学生的结构体,包括学生姓名,分数。找最大分数的下标,将该下标的结构体中的姓名输出即可 #include<bits/stdc+

1147. 段式回文

难度hard 段式回文 其实与 一般回文 类似,只不过是最小的单位是 一段字符 而不是 单个字母。 举个例子,对于一般回文 "abcba" 是回文,而 "volvo" 不是,但如果我们把 "volvo" 分为 "vo"、"l"、"vo" 三段,则可以认为 “(vo)(l)(vo)” 是段式回文(分为 3 段)。 给你一个字符串 text,在确保它

PAT (Advanced Level) Practice 1147 Heaps

本题仅仅用到堆的性质(大顶堆和小顶堆)并不涉及对堆的代码考察,实际上考察的还是完全二叉树的性质,以及通过层序遍历得到后序遍历 之前也认真写过一次,但是没有写出来;这次又试了试,过了 对于遍历,还是先记录过程中的数据;最后在main()函数里输出结果 #include <cstdio> #include <vec

Leetcode 1147. 段式回文(DAY 60) ---- 动态规划学习期(第一题难度并不难但是感觉今天状态不是很好)

原题题目 代码实现(首刷部分看解部分自解) int test(char* text,int count,int start1,int start2) { int i; for(i=0;i<count;i++) if(text[start1+i] != text[start2+i]) return 0; return 1; } int longestDecomposition(char * text){ int

1147 Heaps (30 分)给出序列判断最大/最小堆

题意:给出序列判断是否为最大堆/最小堆,并输出后序遍历序列 #include<bits/stdc++.h> using namespace std; int n,m; int a[10005]; int k[10005]; int sum1,sum2,sum; vector<int> v; void dfs(int index,int cnt) { if(index>n) { int p=k[0],f=k[0],p1=0,f1=0; for(

杭电 acm 题目分类

基础题:1000、1001、1004、1005、1008、1012、1013、1014、1017、1019、1021、1028、1029、1032、1037、1040、1048、1056、1058、1061、1070、1076、1089、1090、1091、1092、1093、1094、1095、1096、1097、1098、1106、1108、1157、1163、1164、1170、1194、1196、1197、1201、1

1147: 查找子数组

1147: 查找子数组 时间限制: 1 Sec 内存限制: 128 MB 提交: 3600 解决: 2129 [状态] [讨论版] [提交] [命题人:admin] 题目描述 给定两个整型数组,数组a有n个元素, 数组b有m个元素,1<=m<=n<100,请检验数组b是否是数组a的子数组。若从数组a的某个元素a[i]开始,有b[0]=a[i],b[1]

免费杀毒软件真的能杀木马吗?

​当然……能。 如果很怀疑的话,可以用开源的,开源的那是完全透明、完全真实的,人民群众都可以鉴定,所以,开源的肯定是能的,很能的。 开源杀毒软件,比如ClamAV,国内也有开源的杀毒软件,比如Ty2y杀毒软件。 点赞 收藏 分享 文章举报 w2sfot 发布了64 篇

codeforces 1147 C

一开始考虑到了1的个数。。。 后来发现应该是最小值的个数。 考虑两种情况。 最小值的个数不大于一半,那么我们可以选一些石子使得最小值的个数大于一半。 最小值的个数大于一半的话,我们不管怎么选,都会使得最小值的个数小于一半。 然后我们很容易发现后者是必败态,比方说1111这样子

1147 Heaps (30 分)

1147 Heaps (30 分)   In computer science, a heap is a specialized tree-based data structure that satisfies the heap property: if P is a parent node of C, then the key (the value) of P is either greater than or equal to (in a max heap) or less than

PAT 1147 Heaps

https://pintia.cn/problem-sets/994805342720868352/problems/994805342821531648   In computer science, a heap is a specialized tree-based data structure that satisfies the heap property: if P is a parent node of C, then the key (the value) of P is either gr