- 博客(8)
- 资源 (2)
- 收藏
- 关注
原创 约瑟夫斯问题
#include using namespace std; int J(int n) { if(n==1) { return 1; } if(n%2==0) { return 2*J(n/2)-1; } if(n%2!=0) { return 2*J(n/2)+1; } }
2017-06-03 18:52:12 479
原创 C语言 学生信息增删改查
#include #include #include #include #include #include #define LEN sizeof(struct student) typedef struct student { long int StudentID; //学号 int age; //年龄 int enrolment; //入学年份 char
2017-06-03 18:31:54 9178 1
原创 new和delete
#include using namespace std; /* 二级指针方式开辟和释放内存 */ void twolevel_pointer(int m,int n) { /* 开辟内存 */ int **p=new int*[m]; for(int i=0;i<m;i++) p[i]=new int[n]; /* 赋值并输出 */
2017-06-03 18:19:31 301
原创 文件
排序: #include #include #include using namespace std; int numbers[10000]; int MyCompare(const void* p1,const void* p2) { return *((int*)p1)-*((int*)p2); } int main() { int i=0; ifstrea
2017-05-06 21:42:50 479
原创 回文词
#include #include #include const char* rev = "A 3 HIL JM O 2TUVWXY51SE Z 8 "; const char* msg[] = {"not a palindrome","a regular palindrome","a mirrored string","a mirrored palindrome"}; //常量
2017-04-22 16:34:45 370
原创 WERTYU
把手放在键盘上,稍不注意会往右错一位,这样,输入Q会变成W,等等,输入错位的,输出原本的。#include char s[]="`1234567890-=QWERTYUIOP[]\\ASDFGHJKL;'ZXCVBNM,./"; //注意"\"在这里是"\\" //比较大的字符串尽量声明在main外,否则main无法执行 int main() { int i,c; while((
2017-04-22 15:17:16 601
原创 TeX中的引号
#include int main() { int c,q=1; while((c=getchar())!=EOF) { if(c=='"') {printf("%s",q?"“":"”");q=!q;} else printf("%c",c); } return 0; } scanf("%s") 读入一个不含空格,TA
2017-04-22 15:04:46 575
原创 简单的线性回归
from sklearn.datasets import load_boston import pandas as pd import numpy as np boston=load_boston() print(boston.DESCR) from sklearn.cross_validation import train_test_split X_train,X_test,Y_
2017-04-21 20:26:09 423
宿舍管理系统
2019-03-24
JavaEE音乐网站
2019-03-24
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人