Alex0319
Alex0319
全部文章
分类
PAT(11)
poj(16)
算法(1)
题解(30)
归档
标签
去牛客网
登录
/
注册
欲买桂花同载酒,终不似,少年游
保持好奇,保持积极
全部文章
(共64篇)
poj3983 0ms 暴力模拟
#include<cstdio> #include<cmath> using namespace std; //暴力模拟,括号有5种,符号有64种,一共5*64,所以暴力 #define rep(i,a,b) for(int i = a;i<b;++i) #define...
Violent
poj
2019-08-20
0
555
poj2456 110ms 二分+贪心
#include<cstdio> #include<algorithm> //二分,很多需要注意的地方 const int Maxn = 1e5; int stalls[Maxn+5]; int n,c; int cnt,tmp; bool Judge(int dis) { ...
BinarySearch
poj
GREEDY
2019-08-19
0
579
poj1844 0ms 数学题
#include<cstdio> using namespace std; /*sum-n如果为奇数肯定不可能,因为从+ -> -,一定相差2*x,一定是偶数 如果为偶数的话,那么该偶数一定小于sum,所以一定在1+……+i中由若干个数相加之和中 因为小于sum的偶数肯定在su...
poj
MATH
2019-08-18
0
391
poj3618 110ms 绝对值排序
#include<cstdio> #include<algorithm> #include<cmath> using namespace std; //绝对值排序 //没看清题开始 要仔细审题 bool cmp(const int a,const int b) {...
SORT
poj
2019-08-17
0
633
poj2081 16ms
#include<cstdio> #include<bitset> using namespace std; const int Maxn = 500000; int num[Maxn+5]; int tmp; bitset<10000000> bit1; voi...
poj
WATER
2019-08-15
0
439
poj3672 97ms 水题
#include<cstdio> using namespace std; //easy int main() { int m,t,u,f,d,c; scanf("%d%d%d%d%d",&m,&t,&u,&f,&d); g...
poj
WATER
2019-08-14
0
454
poj3663
#include<cstdio> #include<algorithm> using namespace std; const int Maxn = 2e4; //binarysearch水题 int main() { int n,s; int num[Max...
poj
BinarySearch
2019-08-13
0
479
poj2413 329ms java大数水过
import java.util.*; import java.math.*; public class Main { //java大数水过 public static void main(String[] args) { Scanner in = new Scan...
java
poj
2019-08-11
0
468
poj1256 32ms
#include<cstdio> #include<algorithm> #include<cstring> using namespace std; bool cmp(int a,int b) { /*扩大两倍两个同类型字母正好差2,中间可以放一个大(小...
poj
STL
2019-08-09
0
572
poj2369 0ms
#include<cstdio> #include<cstring> using namespace std; //逐个判断是否满足条件,如果一次性更改所有的话比较麻烦时间复杂度要*n //不算很难,但网上说是置换群。 int gcd(int a,int b) { r...
poj
置换群
2019-08-08
0
490
首页
上一页
1
2
3
4
5
6
7
下一页
末页