- 博客(20)
- 问答 (2)
- 收藏
- 关注
转载 STL 整理map、set、vector、list、stack、queue、deque、priority_queue
向量(vector) 连续存储的元素Vectorc;c.back() 传回最后一个数据,不检查这个数据是否存在。c.clear() 移除容器中所有数据。c.empty() 判断容器是否为空。c.front() 传回地一个数据。c.pop_back() 删除最后一个数据。c.push_back(elem) 在尾部加入一个数据。c[i]
2012-04-27 18:53:07 474
原创 中南4月16号网络同步赛
题目大意:1.求方程x^a==b(mod N)解的数量,N是奇数2.按照方程x^a==b(mod N)的解指示信鸽放飞时间将信鸽分组,每一组不少于k个信鸽,求总延迟最少的分组方法 大概做法:1.将N分解因子,分解为p1^e1*p2^e2... ...,pi为素数,ei为正整数。2.对于每一个pi^ei,求出xi^a=bi(mod pi^ei),式中bi=b%pi^e
2012-04-23 19:28:58 5325
原创 2012xs
所有表明可能包含多个测试样例的题目,请使用EOF判断输入是否完成。例子:C风格:(scanf(输入内容) != EOF)C++风格:while (cin>>一些东西)难度:A.1数据结构,栈(poj1363)B.1杂题C.2构建全图/找出通路/搞成星状图也行(图论,杂题)D.2DP(poj1745)E.2线段树/扫描线(poj1177)F.2bfs(poj2
2012-04-23 18:56:09 2507
原创 头文件函数
数组:#includememcpy(b,a,sizeof(int)*k) copy a中k个到b中;memcpy(b,a,sizeof(a)) 把a copy给b;memset(a,0,sizeof(a)) 把a 清零;字符串:#includesprintf(s,"%d",a) 把数字a 化为字符串;sscanf(s,"%d",&a) 把字符串赋值给a ;str
2012-04-19 20:49:46 749
转载 scanf家族 正则式
好吧,scanf家族函数很强大。下面介绍几个例子1、输入文件,输出字符串数大于80的行#include #include /*a数组的长度至少为n+2*/void fun(char a[], int n){ int i; char s[18], t[18]; //输出大于n的行,构造输入表达式如%8
2012-04-16 20:43:34 617
原创 POJ 2503
F - BabelfishTime Limit:3000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u DescriptionYou have just moved from Waterloo to a big city. The people here speak an incomp
2012-04-16 18:46:51 444
原创 题目一览
CSUST_搜索专题:Problem APOJ 2488A Knight's JourneyProblem BPOJ 3083Children of the Candy CornProblem CPOJ 3009Curling 2.0Problem DPOJ 1321棋盘问题Problem EP
2012-04-16 18:35:04 604
原创 POJ-3009 Curling 2.0 解题报告(搜索) 冰壶游戏
C - Curling 2.0Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64uhttp://openoj.awaysoft.com:8080/judge/problem/viewProblem.action?id=28625 DescriptionOn Plan
2012-04-14 20:14:55 1097
原创 POJ-3083 Children of the Candy Corn 解题报告(搜索) 广搜深搜走迷宫
B - Children of the Candy CornTime Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64uhttp://openoj.awaysoft.com:8080/judge/problem/viewProblem.action?id=28859 Descriptio
2012-04-11 15:05:27 1773 1
原创 POJ-2488 A Knight's Journey 解题报告(搜索) 马跳遍棋格的字典序问题
A - A Knight's JourneyTime Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64uhttp://openoj.awaysoft.com:8080/judge/problem/viewProblem.action?id=23456 DescriptionB
2012-04-09 20:43:49 2339
原创 POJ-1321 棋盘问题 解题报告(搜索) 棋盘问题
链接-D -棋盘问题Time Limit:1000MS Memory Limit:10000KB 64bit IO Format:%I64d & %I64uhttp://openoj.awaysoft.com:8080/judge/problem/viewProblem.action?id=14600 Description在一个给定形状的棋盘(
2012-04-09 20:17:36 726
转载 POJ-3122 Pie 解题报告(二分) 平分派饼
链接- J - PieTime Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u DescriptionMy birthday is coming up and traditionally I'm serving pie. Not just one pie, n
2012-04-09 20:05:31 2198
转载 POJ-1905 Expanding Rods 解题报告(二分) 金属材料的膨胀
链接- I -Expanding RodsTime Limit:1000MS Memory Limit:30000KB 64bit IO Format:%I64d & %I64u DescriptionWhen a thin rod of length L is heated n degrees, it expands to a ne
2012-04-09 19:54:36 853
转载 POJ-3258 River Hopscotch 解题报告(二分) 牛跳石头
链接- H -River HopscotchTime Limit:2000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u DescriptionEvery year the cows hold an event featuring a peculiar version of hops
2012-04-09 19:40:28 1490
原创 OPJ-3349 SnowflakeSnowSnowflakes 解题报告(hash) 两片相同的雪花
链接- A -SnowflakeSnowSnowflakesTime Limit:4000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u DescriptionYou may have heard that no two snowflakes are alike. Your task i
2012-04-09 19:37:00 775
转载 POJ-1183反正切函数的应用 解题报告(数论) 反正切函数,一个同余问题
链接-B -反正切函数的应用Time Limit:1000MS Memory Limit:10000KB 64bit IO Format:%I64d & %I64u Description反正切函数可展开成无穷级数,有如下公式 (其中0 使用反正切函数计算PI是一种常用的方法。例如,最简单的计算PI的方法: PI=4arc
2012-04-09 19:23:42 1239
转载 OPJ-1067 取石子游戏 解题报告(数论) 取石子游戏,betty定理
连接--A -取石子游戏Time Limit:1000MS Memory Limit:10000KB 64bit IO Format:%I64d & %I64u Description有两堆石子,数量任意,可以不同。游戏开始由两个人轮流取石子。游戏规定,每次有两种不同的取法,一是可以在任意的一堆中取走任意多的石子;二是可以在两堆中同时取走相同数量的石子。
2012-04-09 19:00:35 671
原创 POJ-2262 Goldbach's Conjecture 解题报告(数论) 哥德巴赫的猜想
连接--K -Goldbach's ConjectureTime Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64uDescriptionIn 1742, Christian Goldbach, a German amateur mathematician, sent a lette
2012-04-09 18:47:11 904
转载 POJ-1730 Perfect Pth Powers 解题报告(数论) 最大开方数
连接--J -Perfect Pth PowersTime Limit:1000MS Memory Limit:10000KB 64bit IO Format:%I64d & %I64u DescriptionWe say that x is a perfect square if, for some integer b, x = b2. Simil
2012-04-09 18:34:55 559 1
转载 POJ-1152 An Easy Problem! 解题报告(数论) 是不是N进制数
连接----An Easy Problem!Time Limit: 1000MS Memory Limit: 10000KTotal Submissions: 7802 Accepted: 1884DescriptionHave you heard the fact "The base of every normal numb
2012-04-07 19:47:35 670
空空如也
Couldn't connect to Julia
2015-08-16
Cmake CGAL libQGLViewer
2015-07-23
TA创建的收藏夹 TA关注的收藏夹
TA关注的人