1、"std::ios_base::Init::~Init()", referenced from答1: 如果出现这样的编译问题,是需要再加进libstdc++.dylib和libstdc++.6.dylib(为6.1使用)2、apple Mach-o Linker error答2: 通常是因为co...
分类:
移动开发 时间:
2014-07-16 19:14:54
阅读次数:
222
BFS。 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 7 #define MAXN 305 8 9 typedef struct node_st {10 int x, y;11 ...
分类:
其他好文 时间:
2014-07-15 23:05:28
阅读次数:
289
斐波那契博大精深啊,还有求幂的迭代也有点意思 1 //斐波那契有好多中方法 2 #include 3 #include 4 using namespace std; 5 6 //注意普通斐波那契,在太大数时就会发生越界,比如long long 只能存表示第92个数,这些都是小的斐波...
分类:
其他好文 时间:
2014-07-15 22:50:18
阅读次数:
276
A:SPOJ NWERC11A A
- Binomial coefficients
题解:点击打开链接
B: 点击打开链接
Bird tree
从下到上发现是个gcd的过程(辗转相除
#include
#include
#include
using namespace std;
int main() {
int T;
scanf("%d", &T);...
分类:
其他好文 时间:
2014-07-15 13:07:18
阅读次数:
317
将兔子的血量从小到大排序,箭的威力也从小到大排序,
对于每只兔子将威力大于血量的箭加入队列,写个优先队列使得出来数位价钱最少。。
#include
#include
#include
#include
#include
using namespace std;
const int maxn=100010;
struct tt
{
int d;
int p;
bool operator<...
分类:
其他好文 时间:
2014-07-15 12:52:52
阅读次数:
321
题意:
一块矩形空间 一开始每个格子都是1 有4种操作: S操作将(x1,y1)-(x2,y2)所画出的矩形中的数求和 A操作是在(x,y)加z D是在(x,y)减z 注意不能减成负数 M是移动
思路:
裸二维树状数组… POJ上有楼教主出过的题
代码:
#include
#include
#include
using namespace std;
#defi...
分类:
其他好文 时间:
2014-07-15 12:32:01
阅读次数:
279
题目链接:点击打开链接
#include
#include
#include
#include
#include
using namespace std;
const int MAX_N = 507;
const long long INF = (long long)1e15;
typedef long long ll;
typedef pair pii;
ll C[MAX_N][MA...
分类:
其他好文 时间:
2014-07-15 10:44:20
阅读次数:
229
由题意推得结论:p+q-gcd(p,q);
/*
* hdu 1722--Cake
* date 2014/7/15
* state AC
*/
#include
#include
using namespace std;
/*
int gcd(int x,int y)
{
while(x!=y)
{
if(x>y)x=x-y;
else y...
分类:
其他好文 时间:
2014-07-15 10:32:39
阅读次数:
184
A - DZY Loves Hash水题,开辟一个数组即可#include #include #include #include using namespace std;int main(){ int p,n; cin >> p >> n; vector buckets(302,f...
分类:
其他好文 时间:
2014-07-14 19:46:01
阅读次数:
307
本题题意为求 t (t#include #include #define maxn 100010using namespace std;int sign[maxn];int pri[maxn];int tot;int e;int n[200],k[200];void getpri (){ me...
分类:
其他好文 时间:
2014-07-14 19:06:58
阅读次数:
248