摘要:
Yet another end of the worldTime Limit: 6000/3000 MS (Java/Others)Memory Limit: 65535/32768 K (Java/Others) Total Submission(s): 0Accepted Submission(s): 0 Problem DescriptionIn the year 3013, it has been 1000 years since the previous predicted rapture. However, the Maya will not play a joke any mor 阅读全文
摘要:
本程序可以通过输入简谱用windows自带蜂鸣器函数播放出音乐,会编程的你可以借此在朋友面前show一下啦,哈哈首先,下面这个是样例程序,里面有《国歌》《樱花草》《菊花台》《朋友》《生日快乐》这几首歌曲,以后有时间再做一些播放直接引用相应函数即可 1 #include 2 #include 3 void check(); 4 void Birthday(); 5 void JuHuaTai(); 6 void YingHuaCao(); 7 void GuoGe(); 8 void PengYou(); 9 int main() 10 { 11 PengYou(); ... 阅读全文
摘要:
1 #include 2 #include 3 //GetStdHandle和SetConsoleTextAttribute在头文件windows.h中 4 #include 5 using namespace std; 6 void SetColor(unsigned short ForeColor=3,unsigned short BackGroundColor=0) 7 //给参数默认值,使它 8 //可以接受0/1/2个参数 9 { 10 HANDLE hCon = GetStdHandle(STD_OUTPUT_HANDLE); //本例以输出为例 11 SetC... 阅读全文
摘要:
1 #include 2 #include 3 #include 4 #include 5 #include 6 #define MAX__X 23 7 #define MAX__Y 50 8 #define MAX_FOOD 50 9 #define ESC 27 10 #define SPACE 32 11 12 typedef struct Node 13 { 14 int x; 15 int y; 16 struct Node *next; 17 } Node,*LinkList; 18 19 typedef struct 20... 阅读全文
摘要:
1 #include 2 #include 3 using namespace std; 4 class Fract 5 { 6 public: 7 Fract(){num=0;den=1;} 8 Fract(int a=0,int b) 9 { 10 if(b==0) 11 { 12 cout>(istream &in,Fract &a);//重载>> 49 friend Fract operator * (const Fract &a,int i);//分数乘整数 50 ... 阅读全文
摘要:
#include#includevoid main(){ float a,e,check1; int b,c,d; char w; printf("=====================读心术======================\n\n"); printf("请按照以下要求计算,你将会看到这个神奇的数字:1089\n"); printf("请输入一个三位数,百位和十位不要相同:\n"); scanf("%f",&a); b=a/100; c=a/10-b*10; d=a-c*10-b*100; 阅读全文
摘要:
Sum It UpTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 3129Accepted Submission(s): 1578 Problem DescriptionGiven a specified total t and a list of n integers, find all distinct sums using numbers from the list that add up to t. For example, if t 阅读全文
摘要:
Prime Ring ProblemTime Limit: 4000/2000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 20363Accepted Submission(s): 9115 Problem DescriptionA ring is compose of n circles as shown in diagram. Put natural number 1, 2, ..., n into each circle separately, and the sum of 阅读全文
摘要:
Magic Pen 6Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65535/32768 K (Java/Others) Total Submission(s): 840Accepted Submission(s): 304 Problem DescriptionIn HIT, many people have a magic pen. Lilu0355 has a magic pen, darkgt has a magic pen, discover has a magic pen. Recently, Timer also got 阅读全文
摘要:
对应HDU3791#include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std ;#ifdef DeBUG#define bug assert#else#define bug //#endif#define zero {0}#define INF 2000000000#define eps 1e-6typedef struct _Node //二叉树类,n保存变量{ int n;... 阅读全文