- 博客(19)
- 资源 (5)
- 问答 (1)
- 收藏
- 关注
原创 回形打印二维数组,要求不在内存中开辟二维数组——腾讯二面
该题为腾讯mxg面试委员会二面试题,要求如下: 逐行打印n * n回型矩阵( 不可以在内存填好整个矩阵然后再打印) n=3 1 2 3 8 9 4 7 6 5 n=4 1 2 3 4 12 13 14 5 11 16 15 6 10 9 8 7 不在内存中开辟二维数组,则应该寻找(i, j)与num的关系,达到O(1)计算(i, j)上应该填充的num 将二维数组看成一层一层...
2019-09-05 11:32:45 752
原创 位操作实现加减乘除和幂运算
位操作实现加减乘除和幂运算 位操作在一定程度上加快了计算的速度,上本科的时候实现过位运算的各种运算,时间长了已经忘光了,拿出来重新实现实现。 位操作回顾 与(&):同真为真,其余为假 0&0=0、0&1=0、1&0=0、1&1=1 或(|):有真为真,无真为假0|0=0、0|1=1、1|0=1、1|1=1 非(~):真变假,假变真~0=1、~...
2018-08-28 22:07:43 1322 1
原创 hdu 1022 Train Problem I(简单模拟+栈)
Train Problem I Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 32596 Accepted Submission(s): 12290 Problem Description As the new t
2016-10-26 16:24:27 337
原创 关于DNA 碱基序列检验的JAVA代码
This assignment focuses on arrays and file/text processing. Turn in a file named DNA.java. You will also need the two input files dna.txt and ecoli.txt from the course web site. Save these files in
2016-03-11 21:20:33 2022
原创 VS下的数据库更删改
数据库操作在现实应用中还是很重要的,掌握最基本的更删改也是有必要的,这里介绍一些类来使用。 SqlConnection 实例化的对象用于连接数据库。连接语句有很多,网上也能够找到很多。 Data Source=@Serverip;Initial Catalog=@catalog;Integrated Security=true;是比较简单的连接语句 SqlDataAdapter 数据
2015-12-30 15:36:32 856
原创 Ponds(图论胡搞)
Ponds Time Limit: 1500/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 3851 Accepted Submission(s): 582 点击打开链接 Problem Description Betty owns a
2015-09-14 20:03:49 385
原创 The Water Problem(RMQ)
The Water Problem Time Limit: 1500/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 1634 Accepted Submission(s): 1245 点击打开链接 Problem D
2015-09-14 19:43:40 352
原创 hdu 3183 A Magic Lamp(贪心,RMQ)
A Magic Lamp Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 2361 Accepted Submission(s): 938 点击打开链接 Problem Description Kiki
2015-08-25 11:17:53 276
转载 求Pell方程解
#include #include #include using namespace std; struct PellAns { int p,q; }; struct Node { int g,h; }; PellAns Solve(int n) { PellAns s[4]; Node w[4]; int a[4]; s[0].p=
2015-08-24 12:04:03 561
原创 hdu 5417 Victor and Machine(简单数学题)
Victor and Machine Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/65536 K (Java/Others) Total Submission(s): 232 Accepted Submission(s): 128 点击打开链接 Problem Descrip
2015-08-23 09:27:20 654
转载 SPOJ 2832 DETER3 - Find The Determinant III(矩阵行列式)
DETER3 - Find The Determinant III no tags Given a NxN matrix A, find the Determinant of A % P. Input Multiple test cases (the size of input file is about 3MB, all numbers in each matri
2015-08-22 11:11:25 1022
原创 hdu 5402 Travelling Salesman Problem(构造+模拟)
Travelling Salesman Problem Time Limit: 3000/1500 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 872 Accepted Submission(s): 316 Special Judge 点击打开链接 Pr
2015-08-21 15:27:21 415
原创 hdu 1269 迷宫城堡(搜索tarjin)
迷宫城堡 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 9906 Accepted Submission(s): 4444 点击打开链接 Problem Description 为了训练小希的方向感,Gardon建立了一座大城堡,里
2015-08-19 09:40:43 406
原创 链式前向星
图的存储常见的就两种:邻接表和邻接矩阵。链式前向星是介于两者之间的一种图的存储方式。 重点在于引入了一个 head[ ] 数组,利用 head[ ] 数组抽象的构造出了邻接表的一种存储方式。 head[u]存储的是最后一条存入u节点的边的序号,之所以是最后一条边是因为在构造的过程中不断的将上一轮称之为最后一条边的序号转移,新来边的序号去覆盖head[u]。这种方法有点像邻接表的
2015-08-18 10:39:32 387
原创 hdu 1268 积木堆砌的城堡(贪心)
积木堆砌的城堡 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 355 Accepted Submission(s): 75 Problem Description 一天,小希用积木搭了个城堡,并且照了正面和侧面的照片(前视图和
2015-08-17 15:29:52 1745
原创 简易动态验证码生成
许多登陆界面有输入动态验证码,所以学习了下怎么写。 using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Thre
2015-08-12 18:26:33 544
原创 hdu 3665 Seaside(最短路)
Seaside Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1253 Accepted Submission(s): 915 Problem Description XiaoY is living in a big
2015-08-12 08:54:47 332
原创 hdu 1010 Tempter of the Bone(搜索+奇偶剪枝)
Tempter of the Bone Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 90187 Accepted Submission(s): 24509 Problem Description The doggie f
2015-08-11 21:56:09 335
原创 hdu 1428 漫步校园(记忆化搜索+宽搜最短路)
漫步校园 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 3452 Accepted Submission(s): 1045 Problem Description LL最近沉迷于AC不能自拔
2015-08-11 13:42:05 624
TA创建的收藏夹 TA关注的收藏夹
TA关注的人