码迷,mamicode.com
首页 >  
搜索关键字:putchar    ( 519个结果
P1282-多米诺骨牌
1 #include 2 #define maxn 13003 3 #define _for(i,a,b) for(int i = (a);i = 10) write(x / 10); 19 putchar(x % 10 + '0'); 20 } 21 int N,V = 0; 22 int bas... ...
分类:其他好文   时间:2019-08-11 00:50:01    阅读次数:63
慢速乘模板(支持负数与零
#include #include #include #include #include #include #define inf 2147483647 #define N 1000010 #define p(a) putchar(a) #define For(i,a,b) for(long lon... ...
分类:其他好文   时间:2019-08-07 20:46:54    阅读次数:76
P1017-进制转换
1 #include 2 #include 3 #include 4 #define _for(i,a,b) for(int i = (a);i = 10) write(x / 10); 21 putchar(x % 10 + '0'); 22 } 23 char rnt[100]; 24 int ... ...
分类:其他好文   时间:2019-07-31 18:18:45    阅读次数:111
P3857 [TJOI2008]彩灯(线性基)
题目链接:https://www.luogu.org/problem/P3857 解题报告: 给出一个序列,让你求出异或后有多少种可能的情况。 将给的数插入到线性基中,最后答案即为$(1LL<<res)%2008$,res为线性基的种类数。 AC代码: 1 #include<vector> 2 #i ...
分类:其他好文   时间:2019-07-30 20:12:29    阅读次数:117
HDU校赛 | 2019 Multi-University Training Contest 3
2019 Multi University Training Contest 3 1004. Distribution of books 考虑二分答案,设当前二分出来的是$x$。 设$f_i$表示前$i$个能分成最多的段数,使得每一段和都$\leqslant x$。 转移显然,枚举一个$j$,若$s ...
分类:其他好文   时间:2019-07-30 18:50:23    阅读次数:143
P1088-火星人
1 #include 2 using namespace std; 3 #define _for(i,a,b) for(int i = (a);i = 10) write(x / 10); 21 putchar(x % 10 + '0'); 22 } 23 24 int main() 25 { 26... ...
分类:其他好文   时间:2019-07-28 15:38:02    阅读次数:65
题目六:重建二叉树
///////////////////////////////////////////////////////////////////////////////////////// // 9.题目六:重建二叉树// 题目:输入某二叉树的前序遍历和中序遍历的结果,请重建出改二叉树struct Binar... ...
分类:其他好文   时间:2019-07-28 13:43:50    阅读次数:91
[KMP]一本通(http://ybt.ssoier.cn:8088) 1698:字符串匹配
字符串匹配 【题目描述】 对于一个字符集大小为C的字符串pp,可以将任意两个字符在p中的位置进行互换,例如p=12321,交换1、21、2得到21312,交换1、4得到42324,交换可以进行任意次。若交换后p变成了字符串q,则成q与p是匹配的。 给定两个字符集大小为C的字符串s、t,求出s中有多少 ...
分类:Web程序   时间:2019-07-25 23:33:08    阅读次数:1484
最小费用最大流模板
#include #include #include #include #include #include #include #include #include #include #define inf 2147483647 #define ls rtq; void in(int &x){ int ... ...
分类:其他好文   时间:2019-07-18 21:13:59    阅读次数:104
AT3913 XOR Tree(巧妙转换+状压dp)
Step1: 首先定义一个点的权值为与其相连边的异或和。那么修改一条路径,权值改变的只有两个端点。边权都为0和点权都为0实质相同。 Step2: 那么现在和树的结构就没有什么关系了。每次选两个点,然后同时异或上一个值。求最小次数。 Step3: 首先权值为0的不用修改了,贪心先把权值一样的两两分组。 ...
分类:其他好文   时间:2019-07-13 20:06:58    阅读次数:129
519条   上一页 1 ... 8 9 10 11 12 ... 52 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!