03 2015 档案
摘要:有时候总感觉好迷茫,我已经大二了,再有两年就要毕业了,我能在大学里边做些什么,就这么过去了,就像大多数人一样???!!!!!! #include<stdio.h> #include<string.h> int main(){ int n; char str1[20],str2[1020]; int
阅读全文
摘要:当我首先看到这道题目的时候,我看难度为3,想想一般的算法肯定会超时,但是也想不到其他的方法,于是我就用最笨的存数组的算法试了一下,果然不出我所料。 原谅我没有大神的耐心去一次一次的尝试,参考了大神的算法,果然用着舒服,妈的,看我这出息。。。。。 #include<stdio.h> #include<
阅读全文
摘要:本题用到了了搜索和队列,第一次将这两个加起来写,有点吃力。。。。。。 队列相关知识:http://blog.csdn.net/zxy_snow/article/details/6118988 #include<stdio.h> #include<string.h> #include<queue> #
阅读全文
摘要:费了我好长时间。。。。。 #include<stdio.h> #include<string.h> __int64 deal1(__int64 x,__int64 y){ __int64 temp; temp=1; while(y){ if(y % 2 == 1) temp = temp * x %
阅读全文
摘要:这道题目看了好几个大神的做法,对打表的做法表示灰常佩服。。。。。。 这里是借鉴别人的一种做法 代码: #include<stdio.h> #include<string.h> bool num[9999999]; int prime[1000000]; void deal(){//对数据进行处理 i
阅读全文
摘要:import java.util.Scanner; public class Main { public static void main(String[] args){ Scanner input = new Scanner(System.in); int numberFir = input.ne
阅读全文
摘要:代码:详情解释请看:http://www.cnblogs.com/zhourongqing/archive/2011/10/09/2204071.html #include<cstdio> 02. #include<cstring> 03. #include<algorithm> 04. using
阅读全文
摘要:好久没有刷题了,今天先做到简单的,练练手。。。。 题目链接:http://acm.nyist.net/JudgeOnline/problem.php?pid=255 代码:#include<stdio.h> #include<algorithm> using namespace std; int m
阅读全文
摘要:线性表的动态分配顺序存储结构 #define LIST_INIT_SIZE 10//线性表的存储空间的初始分配量 #define LISTINCREMENT 2//线性表存储空间的分配增量 struct Sqlist { ElemType *elem;//存储空间基址 int length;//当前
阅读全文
摘要:第一个java程序,纪念一下。。。。 import java.util.Scanner; 02. 03. public class Main { 04. public static void main(String[] args) { 05. Scanner input = new Scanner(
阅读全文