- 博客(9)
- 资源 (1)
- 收藏
- 关注
原创 Phone List(The 2007 Nordic Collegiate Programming Contest)
Phone ListTime Limit: 2 Sec Memory Limit: 64 MBSubmit: 774 Solved: 149[Submit][Status][Discuss]DescriptionGiven a list of phone numbers, determine if it is consistent in the sense that no number is ...
2018-03-29 19:09:40 249
原创 栈模拟火车出入站
As the new term comes, the Ignatius Train Station is very busy nowadays. A lot of student want to get back to school by train(because the trains in the Ignatius Train Station is the fastest all over t...
2018-03-26 20:24:40 709 1
转载 c语言 贪吃蛇
#include<stdio.h>#include<time.h>#include<windows.h>#include<stdlib.h> #define U 1#define D 2#define L 3 #define R 4 //蛇的状态,U:上 ;D:下;L:左 R:右 typedef struct SNAKE //蛇...
2018-03-24 22:37:03 385
转载 c语言 俄罗斯方块
#include"graphics.h"#include"time.h"#include"math.h"#include"dos.h"#include"conio.h"#define NULL 0#define False 0#define True 1#define REVOLVE 5#define DOWN 2#define LEFT 3#define RIGHT 4#define TIME...
2018-03-24 22:36:32 369
原创 Calendar
CalendarTime Limit: 1 Sec Memory Limit: 64 MBSubmit: 351 Solved: 124[Submit][Status][Discuss]DescriptionA calendar is a system for measuring time, from hours and minutes, to months and days, and fin...
2018-03-24 22:33:55 513
转载 快速幂求余
int fast_pow(int a,int b,int c){ int ans=1; a%=c; while(b) { if(b&1) ans=a*ans%c; a=a*a%c; b>>=1; } return ans%c;}...
2018-03-24 22:31:25 156
原创 哈希求众数
#include <stdio.h>int main(){ int a[11]={0},i,j,k,m,max; for(i=1;i<=10;i++) { scanf("%d",&j); a[j]++; } max=a[0];m=0; for(i=1;i<=10;i++) { if(...
2018-03-24 22:30:31 512 1
原创 埃氏筛法求素数
#include <stdio.h>int main(){ int a[1001]={0}; int i,j; for(i=2;i<=1000;i++) { if(a[i]==0) { for(j=i+i;j<=1000;j+=i) a[j]=1; } } ...
2018-03-24 22:29:29 352
转载 sort
sort 头文件 #include<algorithm> + using namespace std;1.一维数组排序#include<stdio.h>#include<stdlib.h>#include<algorithm>using namespace std;bool cmp(int a,int b)//如果是d...
2018-03-24 22:28:18 111
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人