
暴力
文章平均质量分 75
HARD_UNDERSTAND
Just try
展开
-
Codeforces 632D 暴力
题目:http://codeforces.com/contest/632/problem/D 题目: 给出n个数,和m,要求从这n个数中找出最多个数,使它们的最小公倍数不超过m 分析: 先统计一下输入的数的个数,然后暴力求出每个数的倍数都加上这个数的个数,然后在m的范围内找一个最多的数。#include<bits/stdc++.h> using namespace std; const in原创 2016-03-22 12:45:03 · 458 阅读 · 0 评论 -
hdu 5631 并查集
题目:hdu 5631 题意: 有一个n个点的连通图有n+1条边,问有几种删边的方法可以保持连通。 分析: n个点的连通图,那么最多可以删去两条边,因为n<100,可以枚举删除的是哪两条边,然后判联通。#include<cstdio> #include<cstring> #include<algorithm> #include<vector> #include<iostream> using原创 2016-03-24 00:22:18 · 314 阅读 · 0 评论 -
Codeforces 653C - Bear and Up-Down 暴力
C. Bear and Up-Down time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard outputThe life goes up and down, just like nice sequences. Sequence t1原创 2016-05-08 13:03:28 · 1081 阅读 · 0 评论 -
Codeforce 633D multiset
题目:Codeforces 633D 题意: 给出n个数,要求将这n个数排列,使得满足下列要求的前缀最小 the sequence consists of at least two elements f0 and f1 are arbitrary fn + 2 = fn + 1 + fn for all n ≥ 0. n<=1000 分析: 因为f0和f1原创 2016-03-22 19:27:16 · 320 阅读 · 0 评论