- 博客(31)
- 收藏
- 关注
原创 福尔摩斯的约会
题目描述大侦探福尔摩斯接到一张奇怪的字条:“我们约会吧! 3485djDkxh4hhGE 2984akDfkkkkggEdsb s&hgsfdk d&Hyscvnm”。大侦探很 快就明白了,字条上奇怪的乱码实际上就是约会的时间“星期四 14:04”,因为前面两字符串中第1对相同的大写英文字母(大小写有区分)是 第4个字母'D',代表星期四;第2对相同的字符是'E',那...
2019-03-23 11:14:22 132
原创 数素数
import matha = []a.append(2)a.append(3)a.append(5)flag = 1i = 7while flag <= 10000: yin_su = 0 if i % 2 == 0 or i % 3 == 0 or i % 5 == 0: i += 1 continue yin_...
2019-03-23 10:15:03 137
转载 10 进制 VS 2 进制
#include<cstdio>#include<cstring>#include<algorithm>#include<string>#include<cmath>#include<iostream>#include<vector>#include<set>#incl
2019-02-11 15:05:15 161
原创 查找学生信息
#include<cstdio>#include<cstring>#include<algorithm>#include<string>#include<cmath>#include<iostream>#include<vector>#include<set>#incl
2019-02-11 14:25:13 428
原创 剩下的树
#include<cstdio>#include<cstring>#include<algorithm>#include<string>#include<cmath>#include<iostream>#include<vector>#include<set>#incl
2019-02-11 10:54:15 129
原创 N的阶乘
#include<cstdio>#include<cstring>#include<algorithm>#include<string>#include<cmath>#include<iostream>#include<vector>#include<set>#incl
2019-02-10 12:37:13 171
原创 最小花费
#include<cstdio>#include<cstring>#include<algorithm>#include<string>#include<cmath>#include<iostream>#include<vector>#include<set>#incl
2019-02-10 11:57:27 323
原创 完数VS盈数
#include<cstdio>#include<cstring>#include<algorithm>#include<string>#include<cmath>#include<iostream>#include<vector>#include<set>#incl
2019-02-10 11:18:40 224
原创 递推数列
#include<cstdio>#include<cstring>#include<algorithm>#include<string>#include<cmath>#include<iostream>#include<vector>#include<set>#incl
2019-02-10 11:18:14 359
原创 最大序列和
#include<cstdio>#include<cstring>#include<algorithm>#include<string>#include<cmath>#include<iostream>#include<vector>#include<set>#incl
2019-02-10 11:18:07 445
原创 今年的第几天
#include<cstdio>#include<cstring>#include<algorithm>#include<string>#include<cmath>#include<iostream>#include<vector>#include<set>#incl
2019-02-09 15:48:13 151
原创 root(n,k)
//二分求幂:int getMi(int a,int b){ int ans = 1; while (b != 0) { //当二进制位k位为1时,需要累乘a的2^k次方,然后用ans保存 if (b % 2 == 1) { ans *= a; } a *...
2019-02-09 15:36:09 400
原创 n的阶乘
#include<cstdio>#include<cstring>#include<algorithm>#include<string>#include<cmath>#include<iostream>#include<vector>#include<set>#incl
2019-02-09 15:35:58 141
原创 特殊乘法
#include<cstdio>#include<cstring>#include<algorithm>#include<string>#include<cmath>#include<iostream>#include<vector>#include<set>#incl
2019-02-09 15:35:48 174
原创 最小邮票数
#include<cstdio>#include<cstring>#include<algorithm>#include<string>#include<cmath>#include<iostream>#include<vector>#include<set>#incl
2019-02-09 11:12:37 127
原创 球的半径和体积
#include<cstdio>#include<cstring>#include<algorithm>#include<string>#include<cmath>#include<iostream>#include<vector>#include<set>using
2019-02-09 10:06:21 202
原创 二叉树遍历
#include <iostream>#include <cstdlib>#include <cstring>#include <cstdio>using namespace std;/*对二叉树的基本理解,简单题*//*其实这东西网上教程很多,二叉树的遍历和二叉树建立的写法差不多*/char str[101];int x; ...
2019-02-09 10:06:06 114
原创 玛雅人的密码
#include<cstdio>#include<cstring>#include<algorithm>#include<string>#include<cmath>#include<iostream>#include<vector>#include<set>#incl
2019-02-09 10:04:22 158
原创 求最大最小数
#include<cstdio>#include<cstring>#include<algorithm>#include<string>#include<cmath>#include<iostream>#include<vector>#include<set>using
2019-02-09 10:03:46 158
原创 abc
#include<cstdio>#include<cstring>#include<algorithm>#include<string>#include<cmath>#include<iostream>#include<vector>#include<set>#incl
2019-02-09 10:03:33 249
原创 成绩排序
#include<cstdio>#include<cstring>#include<algorithm>#include<string>#include<cmath>#include<iostream>#include<vector>#include<set>using
2019-02-08 13:27:36 170
原创 整数拆分
#include<stdio.h>#include<stdlib.h>int f[1000001];int main (){ int i, n; while(scanf("%d",&n) != EOF) { if((n < 1) || (n > 1000000)){ printf("-...
2019-02-08 13:26:28 427
原创 质因数个数
#include<cstdio>#include<cstring>#include<algorithm>#include<string>#include<cmath>#include<iostream>#include<vector>#include<set>using
2019-02-08 13:24:48 200
原创 手机键盘
#include <iostream>#include <string.h>using namespace std; /*代码长,但是题目简单,我用的是网上一位同学的方法,真的太多case,不想写;注意这个手机键盘的字母,建议网上搜索一下再做*/int PressTime(char c){ switch(c){ case 'a':...
2019-02-08 13:21:37 101
原创 反序输出
#include<cstdio>#include<cstring>#include<algorithm>#include<string>#include<cmath>#include<iostream>#include<vector>#include<set>using
2019-02-08 13:19:35 171
原创 代理服务器
#include<cstdio>#include<cstring>#include<algorithm>#include<string>#include<cmath>#include<iostream>#include<vector>#include<set>using
2019-02-08 13:18:34 237
原创 约数的个数
#include<cstdio>#include<cstring>#include<algorithm>#include<string>#include<cmath>#include<iostream>using namespace std; typedef long long LL;const int N...
2019-02-08 13:14:07 122
原创 成绩排序
#include<cstdio>#include<cstring>#include<algorithm>#include<string>#include<iostream>using namespace std; /*简单题;struct 和 sort 的结合;cmp函数*/typedef long long LL...
2019-02-08 13:10:38 185
原创 51NOD1005 大数加法
#include<iostream>#include<string.h>#include<algorithm>#include<string>using namespace std ;/*基本思路比较简单,就是代码比较长,我是比价菜鸡的那种;1.判断A , B的正负;2.判断去掉符号的数字的大小比较;3.A > 0 , B...
2019-02-08 12:32:40 104
原创 算法学习BFS初始认识
广度优先搜索:算法思想:从给定的起点节点开始,依次将其邻接节点全部塞入队列,每次访问一个节点时将其pop()出队列,并将其邻接节点也塞入队列。直到队列为空,算法结束。#include<string>#include<string.h>#include<algorithm>#include<iostream>#include<...
2019-02-08 12:07:59 118
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人