码迷,mamicode.com
首页 >  
搜索关键字:ignatius and the pri    ( 1549个结果
优先队列的写法
优先队列:结构体的优先级设置 因为优先队列本质是堆 struct node{ string name; int pri; friend bool operator < (node f1,node f2){ return f1.pri<f2.pri; //友元函数,写在结构体里面的,意思时价格大的优先 ...
分类:其他好文   时间:2020-02-05 18:06:01    阅读次数:76
筛法求素数模板1
基础知识,没什么好说的,直接上代码! 1 const int maxn = 1e8; 2 int prime[maxn+5]; 3 int len; 4 5 int initial_prime() 6 { 7 memset(prime,0,sizeof(prime)); 8 prime[0]=pri ...
分类:其他好文   时间:2020-02-01 23:09:18    阅读次数:63
hdu-1251 统计难题
传送门 Problem Description Ignatius最近遇到一个难题,老师交给他很多单词(只有小写字母组成,不会有重复的单词出现),现在老师要他统计出以某个字符串为前缀的单词数量(单词本身也是自己的前缀). Input 输入数据的第一部分是一张单词表,每行一个单词,单词的长度不超过10, ...
分类:其他好文   时间:2020-02-01 19:17:10    阅读次数:87
HDU1253 胜利大逃亡 (三维bfs)
Ignatius被魔王抓走了,有一天魔王出差去了,这可是Ignatius逃亡的好机会. 魔王住在一个城堡里,城堡是一个A*B*C的立方体,可以被表示成A个B*C的矩阵,刚开始Ignatius被关在(0,0,0)的位置,离开城堡的门在(A-1,B-1,C-1)的位置,现在知道魔王将在T分钟后回到城堡, ...
分类:其他好文   时间:2020-02-01 12:48:49    阅读次数:69
Python-浅析Python面向对象
Python同Java一样,都属于面向对象语言。 面向对象语言,可以创建类及对象的概念,万物皆对象。 类作为一种抽象的概念,可以视为一个通用的模板。 而对象则可视为实例化的类,是一个个的实体。 1 class Car: 2 """这是一个汽车类""" 3 def power(self): 4 pri ...
分类:编程语言   时间:2020-02-01 12:43:26    阅读次数:71
Python 日期时间datetime 加一天,减一天,加减一小时一分钟,加减一年
计算年、月、日需要安装组件包 pip install python-dateutil 当前日期时间 import datetime print datetime.datetime.now() # 2018-05-08 16:53:30.101000 格式化时间 import datetime pri ...
分类:编程语言   时间:2020-01-29 14:25:29    阅读次数:305
Ignatius and the Princess IV HDU - 1029 基础dp
#include<iostream> #include<cstring> #include<cmath> #include<cstdio> #include<algorithm> #include<stack> #include<queue> using namespace std; const i ...
分类:其他好文   时间:2020-01-28 15:34:42    阅读次数:71
hdu1062 text reverse
咳咳,这个是为了赶量 需要注意的就是输入方式,别的也没什么难点 Problem Description Ignatius likes to write words in reverse way. Given a single line of text which is written by Igna ...
分类:其他好文   时间:2020-01-27 15:40:56    阅读次数:55
Python 编程练习
https://acm.ecnu.edu.cn/contest/33/ # 进制转换 import math def main(): T = int(input()) while T > 0: T -= 1 a, b = map(int, input().split()) if a < 0: pri ...
分类:编程语言   时间:2020-01-18 00:58:42    阅读次数:83
spring入门3 -- 通过小项目理解IOC
现在通过一个小程序来了解IOC的思想,这个可能更加直观,首先项目结构就是controller(控制层,他决定接受数据以及分发),service(他负责抽象的一些服务逻辑),dao(负责跟数据库打交道) 先看一下我们操控的模型 package bean; public class User { pri ...
分类:编程语言   时间:2020-01-13 23:49:00    阅读次数:114
1549条   上一页 1 ... 11 12 13 14 15 ... 155 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!