ACM
FredyVia
我不是特别菜了
展开
-
POJ 1328 Radar Installation
我操你妈雷达覆盖范围可以为负数???????????????????害的老子卡了一天下面是ac代码#include<stdio.h>#include<algorithm>#include <utility>#include <cmath>using std::pair;int main(){ int n = 0; int d =...原创 2019-07-08 10:29:11 · 72 阅读 · 0 评论 -
并查集
并查集类实现源代码源代码class DisjSet{private: int* disjSet; int parts;//该类里面有多少棵树public: DisjSet(const int max_size) { disjSet = new int[max_size]; for (int i = 0; i < max_size; ++i) * (disjS...原创 2019-07-30 13:02:30 · 113 阅读 · 0 评论 -
二分查找_double类型scanf用%lf,printf输出用%f
POJ_Aggressive_cows_2456.cpp原创 2019-08-05 10:14:20 · 577 阅读 · 0 评论 -
Conscription--POJ-NO.3723 最小生成树
Conscription--POJ-NO.3723 最小生成树DescriptionInputOutputSample Input:Sample Output:DescriptionWindy has a country, and he wants to build an army to protect his country. He has picked up N girls and M b...原创 2019-08-02 11:25:30 · 152 阅读 · 0 评论 -
C++运算符优先级 + 高于 > 高于 +=
POJ 3273:Monthly_Expense源代码#define _CRT_SECURE_NO_WARNINGS#include <cstdio>#define MAX_N 100000#define INF 0x3f3f3f3f#define MAX(x,y) x<y?y:xint money[MAX_N];int M, N;int binary_sear...原创 2019-08-26 10:15:05 · 605 阅读 · 0 评论