码迷,mamicode.com
首页 >  
搜索关键字:generic algorithm    ( 18934个结果
ST表求LCA
#include<iostream> #include<cstdio> #include<algorithm> #include<cmath> #define N 500005 using namespace std; int n,m,s,x,y; int tot,fr[N],nxt[N << 1] ...
分类:其他好文   时间:2020-10-18 17:08:25    阅读次数:33
题解 CF1396A
CF1397C \(CF round 666\) 好神仙 题目大意 给定你一个长度为 \(n\) 的序列。 你可以进行 $3$ 次操作。 每次可以选定一个区间,把这个区间的每个数都加上 \(len \times x\) $1.$ 数 \(x\) 是整数(可以为负) $2.$ 对于区间的每个数可以取不 ...
分类:其他好文   时间:2020-10-18 16:57:41    阅读次数:20
CF1430F Realistic Gameplay
朴素做法暴力DP,O(nk)过不去。。。 1 #include <cmath> 2 #include <cstdio> 3 #include <cstring> 4 #include <algorithm> 5 #define N1 2005 6 #define ll long long 7 usi ...
分类:其他好文   时间:2020-10-18 16:56:48    阅读次数:23
codeforces 868C - Qualification Rounds (思维)
题目链接:https://codeforces.com/problemset/problem/868/C 如果有方案,那么肯定可以用两道题目完成 这是证明 #include<cstdio> #include<cstring> #include<algorithm> #include<iostream ...
分类:其他好文   时间:2020-10-18 10:20:12    阅读次数:30
P1002 过河卒
所谓年轻,就是意识不到自己的年轻 #include<iostream> #include<cstdio> #include<cstring> #include<algorithm> using namespace std; unsigned long long n,m; unsigned long ...
分类:其他好文   时间:2020-10-18 10:06:40    阅读次数:20
C++关于包含所有头文件的表示
#include<bits/stdc++.h>包含了目前c++所包含的所有头文件 对比: #include <iostream> #include <cstdio> #include <fstream> #include <algorithm> #include <cmath> #include < ...
分类:编程语言   时间:2020-10-18 09:59:50    阅读次数:17
Haywire
题目链接 Haywire 分析 模拟退火裸题,交了 $4$ 次 \(Code\) #include<cstdio> #include<algorithm> #include<cmath> using namespace std; int n , a[15][5] , pos[15] , tmp[15 ...
分类:其他好文   时间:2020-10-14 20:36:25    阅读次数:23
[JSOI2004]平衡点
题目 请前往 [JSOI2004]平衡点 分析 随机算法 为何不模拟退火呢? 于是(其实目前我不懂怎么判断平不平衡) 能量越小系统越平衡 \(Code\) #include<cstdio> #include<algorithm> #include<cmath> using namespace std ...
分类:Web程序   时间:2020-10-14 20:33:13    阅读次数:32
常用库
下面是ACM比赛中常用的几个库 #include<bits/stdc++.h> #include <iostream> #include <cstdio> #include <fstream> #include <algorithm> #include <cmath> #include <deque ...
分类:其他好文   时间:2020-10-13 17:54:20    阅读次数:37
C#的Socket通信Demo
using System;using System.Collections.Generic;using System.Linq;using System.Net;using System.Net.Sockets;using System.Text;using System.Threading;usi ...
分类:Windows程序   时间:2020-10-13 17:36:49    阅读次数:35
18934条   上一页 1 ... 25 26 27 28 29 ... 1894 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!