- 博客(68)
- 资源 (4)
- 收藏
- 关注
原创 [POJ] 1088 -> 滑雪
滑雪Time Limit: 1000MS Memory Limit: 65536KTotal Submissions: 81342 Accepted: 30344DescriptionMichael喜欢滑雪百这并不奇怪, 因为滑雪的确很刺激。可是为了获得速度,滑的区域必须向下倾斜,而且当你滑到坡底,你不得不再次走上坡或者等待升
2015-05-10 11:27:41
596
原创 [POJ] 1579 -> Function Run Fun
Function Run FunTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 16896 Accepted: 8721DescriptionWe all love recursion! Don't we? Consider a three-param
2015-05-08 13:27:52
507
原创 [POJ] 1458 -> Common Subsequence
Common SubsequenceTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 41382 Accepted: 16722DescriptionA subsequence of a given sequence is the given sequence
2015-05-08 11:27:46
427
原创 [POJ] 1008 -> 玛雅历
玛雅历Time Limit: 1000MS Memory Limit: 10000KTotal Submissions: 69633 Accepted: 21426Description上周末,M.A. Ya教授对古老的玛雅有了一个重大发现。从一个古老的节绳(玛雅人用于记事的工具)中,教授发现玛雅人使用了一个一年有365天的叫
2015-05-05 08:08:38
839
原创 [POJ] 2282 -> The Counting Problem
The Counting ProblemTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 3606 Accepted: 1922DescriptionGiven two integers a and b, we write the numbers between
2015-05-04 10:23:32
763
原创 [POJ] 3714 -> Raid
RaidTime Limit: 5000MS Memory Limit: 65536KTotal Submissions: 8937 Accepted: 2694DescriptionAfter successive failures in the battles against the Union, the Empi
2015-05-03 23:37:21
602
原创 期待为线性时间的选择算法
#include using namespace std;int partion(int* arr, int left, int right){ int i = left, j = right, x = arr[i]; while (i < j){ while (i < j && x <= arr[j]) --j; if (i < j) arr[i++] = arr[j];
2015-05-03 22:42:12
533
原创 [POJ] 2318 -> TOYS
TOYSTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 11355 Accepted: 5469DescriptionCalculate the number of toys that land in each bin of a partitioned toy
2015-05-03 18:45:37
627
原创 [POJ] 2299 -> Ultra-QuickSort
Ultra-QuickSortTime Limit: 7000MS Memory Limit: 65536KTotal Submissions: 46284 Accepted: 16842DescriptionIn this problem, you have to analyze a particular sorting a
2015-05-03 15:38:46
440
原创 [POJ] 2084 -> Game of Connections
Game of ConnectionsTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 7709 Accepted: 3891DescriptionThis is a small but ancient game. You are supposed to wri
2015-05-03 14:03:27
576
原创 [POJ] 1400 -> Complicated Expressions
Complicated ExpressionsTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 1528 Accepted: 492DescriptionThe most important activity of ACM is the GSM network.
2015-05-02 18:59:14
735
原创 [POJ] 2388 -> Who's in the Middle
Who's in the MiddleTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 33719 Accepted: 19632DescriptionFJ is surveying his herd to find the most average cow.
2015-04-30 09:41:06
514
原创 [POJ] 2379 -> ACM Rank Table
ACM Rank TableTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 4523 Accepted: 1188DescriptionACM contests, like the one you are participating in, are hoste
2015-04-30 09:31:22
880
原创 [POJ] 1007 -> DNA Sorting
DNA SortingTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 87856 Accepted: 35306DescriptionOne measure of ``unsortedness'' in a sequence is the number of
2015-04-29 09:25:57
461
原创 [POJ] 1664 -> 放苹果
放苹果Time Limit: 1000MS Memory Limit: 10000KTotal Submissions: 27392 Accepted: 17380Description把M个同样的苹果放在N个同样的盘子里,允许有的盘子空着不放,问共有多少种不同的分法?(用K表示)5,1,1和1,5,1 是同一种分法。In
2015-04-29 08:23:18
519
原创 [POJ] 1006 -> 生理周期
生理周期Time Limit: 1000MS Memory Limit: 10000KTotal Submissions: 118841 Accepted: 37330Description人生来就有三个生理周期,分别为体力、感情和智力周期,它们的周期长度为23天、28天和33天。每一个周期中有一天是高峰。在高峰这天,人会在相
2015-04-22 17:29:39
596
原创 [POJ] 1002 -> 487-3279
487-3279Time Limit: 2000MS Memory Limit: 65536KTotal Submissions: 254850 Accepted: 45378Description企业喜欢用容易被记住的电话号码。让电话号码容易被记住的一个办法是将它写成一个容易记住的单词或者短语。例如,你需要给滑铁卢大学打电话
2015-04-22 12:43:54
646
原创 [POJ] 1001 -> 求高精度幂
求高精度幂Time Limit: 500MS Memory Limit: 10000KTotal Submissions: 143826 Accepted: 35104Description对数值很大、精度很高的数进行高精度计算是一类十分常见的问题。比如,对国债进行计算就是属于这类问题。 现在要你解决的问题是:对一个实
2015-04-22 08:41:15
788
原创 [POJ] 2017 -> Speed Limit
Speed LimitTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 17817 Accepted: 12517DescriptionBill and Ted are taking a road trip. But the odometer in their
2015-04-21 20:47:43
571
原创 [POJ] 2013 -> Symmetric Order
Symmetric OrderTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 12607 Accepted: 7681DescriptionIn your job at Albatross Circus Management (yes, it's run
2015-04-21 20:32:08
627
原创 [POJ] 1004 -> Financial Management
Financial ManagementTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 159085 Accepted: 60480DescriptionLarry graduated this year and finally has a job.
2015-04-21 19:50:34
547
原创 [POJ] 1005 -> I Think I Need a Houseboat
I Think I Need a HouseboatTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 91306 Accepted: 39671DescriptionFred Mapper is considering purchasing some lan
2015-04-21 19:45:29
549
原创 [POJ] 1003 -> Hangover
POJ 1003 - HangoverDescriptionHow far can you make a stack of cards overhang a table? If you have one card, you can create a maximum overhang of half a card length. (We're assuming that the
2015-04-21 19:03:41
831
转载 一步一步学做一个CPU——3,用QuartusII通过原理图完成与门电路设计
打开QuartusII软件,程序主界面如下:1, 新建一个工程点击File——>New Project Wizard,打开创建新工程向导,这里你将完成工程的基本设定选项。1, Project name and directory——工程的名称与目录2, Name of the top-level design entity——顶层设计实体的名称
2014-06-17 12:07:45
21488
转载 一步一步学做一个CPU——2,Logisim的简单入门
Logisim的简单入门先来以一个与门电路的实验,来看一下基本的操作,在Logisim中一个与门电路生成过程如下:1.按与门的选择按钮,添加一个与门到电路中。2.使用按钮添加一个输入引脚,用于设置输入电平。3.添加一个引脚,通过属性中设置Pin的属性为输出:这样得到一个输出引脚。4.移动以上添加的元素,得到原理图:注意选中按钮
2014-06-17 12:06:56
34359
1
转载 一步一步学做一个CPU——1,准备工作
一,准备工作参考:罗老板的计算机结构与组成课程http://xgxy.cug.edu.cn/rjgcx/lzw/COD/Machine Structures. Spring 2010, UC Berkeleyhttp://www-inst.eecs.berkeley.edu/~cs61c/sp10/软件环境:Logisim仿真软件(需要JAV
2014-06-17 12:05:21
4174
原创 双向链表
#include "stdafx.h"#include using namespace std;typedef unsigned int UINT;template struct Node{ Type data; Node* prev; Node* next; Node(Type val=NULL):next(NULL),data(val){}};template c
2014-02-02 00:27:45
584
原创 RPN算法
网上流传的代码思路都大体相同,我贴个简短点的代码,有建议请交流!#include #include #include #include #include #include #include using namespace std;void convert(const char* source, string& result){ map priority; priority
2014-01-23 20:55:23
3010
转载 STL总结
目录====================================================第一章 容器第二章 Vector和string第三章 关联容器第四章 迭代器第五章 算法第六章 函数第七章 在程序中使用STL===============================================
2014-01-22 11:33:06
580
原创 【HDOJ】2034 -> 人见人爱A-B
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2034#include #include #include #include using namespace std;int main(){ int m,n,x; set s; while(cin>>m>>n,m||n){ s.clear(); while(m--){
2014-01-18 14:23:37
814
原创 快速排序
#include #include using namespace std;int partion(int a[], int left, int right){ int key=a[left]; while(left<right){ while(leftkey) right--; a[left]=a[right]; while(left<right && a[left]<k
2013-12-03 21:14:06
506
原创 【Java】UDP聊天程序
package tmp;import java.io.BufferedInputStream;import java.net.*;import java.util.Scanner;public class TmpMain implements Runnable{ DatagramSocket sockSend,sockRecv; DatagramPacket packSend,pa
2013-11-17 22:26:07
881
原创 【C++学习笔记】在控制台绘Bitmap
typedef HWND (WINAPI *PROCGETCONSOLEWINDOW)(); PROCGETCONSOLEWINDOW GetConsoleWindow; HMODULE hKernel32 = GetModuleHandle(L"kernel32"); GetConsoleWindow= (PROCGETCONSOLEWINDOW)GetProcAddress(hKer
2013-11-02 22:49:45
1732
原创 【C++学习笔记】计算程序运行所用的时间
DWORD startTime = GetTickCount(); //your paogram DWORD totalTime = GetTickCount() - startTime;
2013-10-29 13:39:58
760
原创 8086寄存器
AH&AL=AX(accumulator):累加寄存器 BH&BL=BX(base):基址寄存器 CH&CL=CX(count):计数寄存器 DH&DL=DX(data):数据寄存器 SP(Stack Pointer):堆栈指针寄存器 BP(Base Pointer):基址指针寄存器 SI(Source Index):源变址寄存器 DI(Destination Index):目的变址
2013-10-13 20:01:54
680
原创 【C++学习笔记】wchar_t、WCHAR、TCHAR数据类型,宏L、TEXT、_TEXT、_T
一、在字符串前加一个L作用: 如 L"我的字符串" 表示将ANSI字符串转换成unicode的字符串,就是每个字符占用两个字节。 strlen("asd") = 3; strlen(L"asd") = 6; 二、 _T宏可以把一个引号引起来的字符串,根据你的环境设置,使得编译器会根据编译目标环境选择合适的(Unicode还是ANSI)字符处理方式
2013-08-27 14:31:47
1358
原创 【C++学习笔记】文件操作编程基础
需要用到的几个函数//*********************************************************************************************************************HANDLE CreateFile(LPCTSTR lpFileName, // file
2013-08-27 11:08:53
671
原创 【C++学习笔记】返回桌面等特系统殊路径地址 —> SHGetSpecialFolderPath
获得桌面路径地址//头文件#include //函数原型BOOL SHGetSpecialFolderPath(HWND hwndOwner, //可用GetDesktopWindow API取一个窗口句柄或直接传NULL. LPTSTR lpszPath, //返回路径的缓冲区 int nFolder, //标识代号 BOOL fCr
2013-08-27 00:24:03
2632
原创 【C++学习笔记】C++控制台程序隐藏界面运行的方法
大家都知道,当编写一个win32 console application时,当运行此类程序的时候默认情况下会有一个类似DOS窗口的console窗口,但是有的时候我们只想在程序中运行一段功能代码,不希望显示这个console窗口,让代码执行完毕之后程序自动退出。具体实现只要在开头加上下面一行宏就可以了。#pragma comment(linker, "/subsystem:\"windows\
2013-08-26 23:41:34
2286
原创 【C++学习笔记】简单的多线程程序(摘自孙鑫C++教学视频)
#include "stdafx.h"#include #include using namespace std;DWORD WINAPI Fun1Proc(LPVOID lpParameter);//thread dataDWORD WINAPI Fun2Proc(LPVOID lpParameter);//thread dataint index=0;int tickets=
2013-08-22 19:38:18
956
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人