码迷,mamicode.com
首页 >  
搜索关键字:define    ( 25272个结果
hdu1704传递闭包
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1704 传递闭包定义在关系集R上,如果关系R中既有元组(x,y)又有元组(y,z)则元组(x,z),将这样的具有最小性的关系集合就是传递闭包。还有解释:传递闭包、即在数学中,在集合 X 上的二元关系 R ...
分类:其他好文   时间:2020-03-29 01:17:49    阅读次数:58
Round A 2020 - Kick Start 2020
Allocation 题意:n(1e5)个数,选出尽可能多的数使他们总和小于等于b。 思路:排序,尽可能取小。 1 #include<bits/stdc++.h> 2 #define LL long long 3 #define dl double 4 void rd(int &x){ 5 x=0; ...
分类:其他好文   时间:2020-03-28 23:32:23    阅读次数:106
AtCoder Beginner Contest 160
传送门 A - Coffee #include <bits/stdc++.h> #define ll long long using namespace std; char s[10]; int main() { //freopen("in.txt","r",stdin); scanf("%s",s ...
分类:其他好文   时间:2020-03-28 23:24:43    阅读次数:96
经典dp——UCF 2016 G
/* dp[i][j][k]表示到了第i颗子弹,cd1=j,cd2=k 的最优解 */ #include<bits/stdc++.h> using namespace std; #define N 1005 int cd1,cd2,n,b[N],dp[5][105][105]; int solve( ...
分类:其他好文   时间:2020-03-28 18:05:56    阅读次数:61
[CF999E] Reachability from the Capital - 强连通分量
有 $n$ 座城市和 $m$ 条单向道路,为了能让首都能够到达所有的城市,最少需要新修建多少新的单向道路? Solution 答案为缩点后的分量图中除 $S$ 所在分量外入度为 $0$ 的分量数 ...
分类:Windows程序   时间:2020-03-28 10:32:11    阅读次数:77
CF1316F Battalion Strength
$CF1316F Battalion Strength$ ~~话说这题真的能评黑吗~~ Solution 先考虑暴力。 将数组排序。我们枚举 $p_i,p_j(i define del(a,i) memset(a,i,sizeof(a)) define ll long long define inl ...
分类:其他好文   时间:2020-03-28 10:25:33    阅读次数:90
6-1 单链表逆转 (20分)
题目链接:6-1 单链表逆转 (20分) 方式一:递归逆置单链表 1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <math.h> 4 #include <string.h> 5 #include <ctype.h> 6 7 #define ...
分类:其他好文   时间:2020-03-28 09:13:17    阅读次数:286
数据结构
数据结构 单调栈 笛卡尔树 "Equivalent Prefixes 前缀笛卡尔树" 序列u,v 对于$[1,ans]$上所有的$[L,R]$$(1 include define int long long define scan(n) scanf("%lld", &(n)) define scan ...
分类:其他好文   时间:2020-03-28 01:00:31    阅读次数:76
登录密码(可输三次)
#define _CRT_SECURE_NO_WARNINGS#include <stdio.h>#include <stdlib.h> int main(){ int i = 0; for (; i < 3; i++) { char password[1024] = { 0 }; printf(" ...
分类:其他好文   时间:2020-03-27 22:03:35    阅读次数:137
顺序表应用1:多余元素删除之移位算法
顺序表应用1:多余元素删除之移位算法 Description 一个长度不超过10000数据的顺序表,可能存在着一些值相同的“多余”数据元素(类型为整型),编写一个程序将“多余”的数据元素从顺序表中删除,使该表由一个“非纯表”(值相同的元素在表中可能有多个)变成一个“纯表”(值相同的元素在表中只保留第 ...
分类:编程语言   时间:2020-03-27 22:00:30    阅读次数:101
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!