
考研机试题(题源:牛客网)
笨比master
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
【上交考研机试题】字符串匹配次数
原题链接:牛客网#include <algorithm>#include <iostream>#include <cstdio>#include <cmath>#include <cstring>#include <queue>#include <stack>using namespace std;原创 2019-03-02 17:17:26 · 230 阅读 · 0 评论 -
【清华大学考研机试题】二叉树遍历
原题链接#include <algorithm>#include <iostream>#include <cstdio>#include <cstdlib>#include <cstring>#include <string>using namespace std;typedef struct BiTNode...原创 2019-03-07 18:05:29 · 397 阅读 · 0 评论 -
【清华大学考研机试题】球的半径和体积
原题链接#include <algorithm>#include <iostream>#include <cstdio>#include <cstdlib>#include <cmath>using namespace std;const double PI = acos(-1);int xa, ya, za, xb, ...原创 2019-03-07 17:34:29 · 269 阅读 · 0 评论 -
【清华大学考研机试题】成绩排序
原题链接#include <algorithm>#include <iostream>#include <cstdio>#include <cstdlib>using namespace std;typedef struct Node{ int id, grade;}Node;const int MAX = 110;in...原创 2019-03-07 17:16:33 · 174 阅读 · 0 评论 -
【清华大学考研机试题】质因子个数
原题链接#include <algorithm>#include <iostream>#include <cstdio>#include <cstdlib>#include <cstring>#include <string>using namespace std;const int MAX = 100010...原创 2019-03-07 16:48:35 · 183 阅读 · 0 评论 -
【清华大学考研机试题】反序输出
原题链接#include <algorithm>#include <iostream>#include <cstdio>#include <cstdlib>#include <cstring>#include <string>using namespace std;int main(){ char ...原创 2019-03-07 16:37:46 · 226 阅读 · 0 评论 -
【清华大学考研机试题】约数的个数(质因子个数)
原题链接#include <algorithm>#include <iostream>#include <cstdio>#include <cstdlib>using namespace std;const int MAX = 100010;int N, X;int p[MAX] = {0};int Prime[MAX] = {0...原创 2019-03-07 16:27:32 · 368 阅读 · 0 评论 -
【清华大学考研机试题】成绩排序(查找和排序)
原题链接#include <algorithm>#include <iostream>#include <cstdio>#include <cstdlib>#include <cstring>#include <string>using namespace std;typedef struct Node{...原创 2019-03-07 16:03:25 · 218 阅读 · 0 评论 -
【清华大学考研机试题】成绩排序(查找和排序)
原题链接#include <algorithm>#include <iostream>#include <cstdio>#include <cstdlib>#include <cstring>#include <string>using namespace std;typedef struct Node{...原创 2019-03-07 16:03:25 · 409 阅读 · 0 评论 -
【复旦14年机试】二叉树遍历
第三题:二叉树遍历问题定义输入一棵二叉树,输出树的前、中、后序遍历结果。输入一个整数N(N<= 10000),表示树中有N个结点(编号0~N-1)。接下来N行,依次为结点0~结点N-1的左右孩子情况。每行3个整数,F,L,R。L,R为F的左右孩子。L,R如果为-1表示该位置上没有孩子。分三行分别输出树的前中后序遍历。同一行中的数字,用一个空格间隔。输入样例50 3 11...原创 2019-03-23 10:15:51 · 361 阅读 · 0 评论 -
【清华大学考研机试题】今年的第几天?
原题链接#include <algorithm>#include <iostream>#include <cstdio>using namespace std;bool isLeapYear(int yy){ if(yy%400 == 0) return true; if(yy%4 == 0 && yy%100) r...原创 2019-03-09 23:10:51 · 343 阅读 · 0 评论 -
【清华大学考研机试题】特殊乘法
原题链接#include <algorithm>#include <iostream>#include <cstdio>#include <cstdlib>#include <cstring>#include <string>using namespace std;int main(){ char ...原创 2019-03-08 23:00:17 · 127 阅读 · 0 评论 -
【清华大学考研机试题】n的阶乘
原题链接#include <algorithm>#include <iostream>#include <cstdio>#include <cstdlib>using namespace std;int main(){ int N; while(scanf("%d", &N) != EOF) { ...原创 2019-03-08 22:52:51 · 363 阅读 · 0 评论 -
【清华大学考研机试题】 求最大最小数
原题链接#include &lt;algorithm&gt;#include &lt;iostream&gt;#include &lt;cstdio&gt;#include &lt;cstdlib&gt;using namespace std;const int INF = 1&lt;&lt;30;int main原创 2019-03-08 22:47:20 · 359 阅读 · 0 评论 -
【2018复旦工研院考研机试题】求并集交集个数
输入两个集合,分别求其交集和并集中元素的个数,每个集合中可能存在相同的元素,而最终的交集和并集中应该不存在。例如:输入:4 53 4 7 34 6 3 2 6输出:2 5#include &amp;lt;algorithm&amp;gt;#include &amp;lt;iostream&amp;gt;#include &amp;lt;cstdio&amp;gt;#in原创 2019-03-23 10:16:21 · 670 阅读 · 0 评论 -
【复旦机试】18年 求众数
1, 求众数。 众数就是一个序列中出现次数最多的数字。 如果不唯一,则输出小的那个值。 给定第一个代表有几个数字。 1<=n<=10^5 每个数字在 int 范围内样例:输入, (第一个代表有几个数字)810 3 8 8 3 2 2 2输出 2#include <algorithm>#include <iostream>#in...原创 2019-03-23 10:16:10 · 231 阅读 · 0 评论