2011年哈尔滨工业大学计算机研究生机试真题
来源:互联网 发布:unity3d小游戏制作视频 编辑:程序博客网 时间:2024/05/10 06:51
题目连接:点击打开链接
解题思路:
暴力
完整代码:
#include <iostream>#include <cstdio>#include <algorithm>#include <cstring>#include <set>using namespace std;const int INF = 1000000000;string s;int main(){ #ifdef DoubleQ freopen("in.txt" , "r" , stdin); #endif // DoubleQ while(cin >> s) { string temp = ""; int len = s.length(); for(int i = len - 1 ; i >= 0 ; i --) temp += s[i]; cout << temp << endl; }}
题目连接:点击打开链接
解题思路:
函数秒杀众生
完整代码:
#include <iostream>#include <cstdio>#include <algorithm>#include <cstring>#include <set>using namespace std;const int INF = 1000000000;int a , b;int main(){ #ifdef DoubleQ freopen("in.txt" , "r" , stdin); #endif // DoubleQ while(cin >> a >> b) { cout << __gcd(a , b) << endl; }}
题目连接:点击打开链接
解题思路:
暴力
完整代码:
#include <iostream>#include <cstdio>#include <algorithm>#include <cstring>#include <set>using namespace std;const int INF = 1000000000;int a[10001];int main(){ #ifdef DoubleQ freopen("in.txt" , "r" , stdin); #endif // DoubleQ memset(a , 0 , sizeof(a)); int k , cnt = 0; while(cin >> k) { cnt ++; if(cnt == 20) { cnt = 0; int maxx = -INF , pos; for(int i = 1 ; i <= 20 ; i ++) { if(a[i] > maxx) { maxx = a[i]; pos = i; } } cout << pos << endl; memset(a , 0 , sizeof(a)); } a[k]++; }}
0 0
- 2011年哈尔滨工业大学计算机研究生机试真题
- 2011年哈尔滨工业大学计算机研究生机试真题
- 2010年哈尔滨工业大学计算机研究生机试真题
- 2012年哈尔滨工业大学计算机研究生机试真题
- 2010年哈尔滨工业大学计算机研究生机试真题
- 题目1056:最大公约数(2011年哈尔滨工业大学计算机研究生机试真题)
- 题目1051:数字阶梯求和 2010年哈尔滨工业大学计算机研究生机试真题
- 题目1047:素数判定(2009年哈尔滨工业大学计算机研究生机试真题)
- 题目1045:百鸡问题(2009年哈尔滨工业大学计算机研究生机试真题)
- 西北工业大学计算机研究生机试真题
- 2011年上海交通大学计算机研究生机试真题
- 2011年吉林大学计算机研究生机试真题
- 2011年上海交通大学计算机研究生机试真题
- 2011年吉林大学计算机研究生机试真题
- 2011年浙江大学计算机及软件工程研究生机试真题
- 2011年浙江大学计算机及软件工程研究生机试真题
- 2011年北京大学计算机研究生机试真题(题解)
- 2010年北京大学计算机研究生机试真题
- 后台List<String> list 传到前台 select输出 问题
- Python--简单的用户管理系统
- Java_socket程序学习0501-彩票销售-第一阶段server端整理-成功
- 职业女性确实处于劣势吗?记一次不甚严谨的考据 -- 向胡适之先生的遥远致敬
- Cocos2d-x_Box2D刚体使用PhysicsEditor工具生成形状
- 2011年哈尔滨工业大学计算机研究生机试真题
- WCF实例上下文与并发
- iOS开发--利用NSProxy实现消息转发-模块化的网络接口层设计
- hdu 2610 Sequence one ( dfs+可行性剪枝 )
- 动态规划-阿里笔试
- Spark集群资源调度
- 关于++i与i++以及静态成员变量与非静态成员变量新手疑惑的地方
- 汤米维斯提
- 最长回文子串的长度 南邮NOJ 1968