------------解题报告-------------
文章平均质量分 84
kyoma
这个kyoma就是逊啦
展开
-
[kuangbin带你飞]专题十四 数论基础——A 题解
A - Bi-shoe and Phi-shoeTime Limit:2000MS Memory Limit:32768KB 64bit IO Format:%lld & %lluSubmit Status Practice LightOJ 1370 uDebugDescriptionBamboo Pole-vault is a massiv原创 2016-07-24 20:56:43 · 967 阅读 · 0 评论 -
刘汝佳紫书 uva201 解题报告
我的做法是检查每个长度下每个点是否符合作为正方形的左上角的要求一下是代码,输出很容易PE#include #include #include using namespace std;struct unit{ bool right,down;};int main(){ unit bot[10][10]; int i,j,n,m,it,jt,k; c原创 2016-07-02 00:38:22 · 914 阅读 · 0 评论 -
刘汝佳紫书 uva220 解题报告
没想到AC了好感动啊。。。前面的那道象棋蜜汁WA把我搞的身心俱疲,又见到一个和棋有关的题就怂了啊本来觉得会和象棋那题一样蜜汁WA的说,结果提交的时候看到presentation error整个心是紧了一下好吗!!简直是初恋的感觉啊!!结果这题输出及其坑爹。。。输出注意:1、打印有效点的时候每个点之间都有空格,但是最后一个点后面不能有2、每个回合之间有空行(这个想必大家都会注原创 2016-07-05 01:14:15 · 1607 阅读 · 0 评论 -
湖南省第六届大学生计算机程序设计竞赛__弟弟的作业
题目描述你的弟弟刚做完了“100以内数的加减法”这部分的作业,请你帮他检查一下。每道题目(包括弟弟的答案)的格式为a+b=c或者a-b=c,其中a和b是作业中给出的,均为不超过100的非负整数;c是弟弟算出的答案,可能是不超过200的非负整数,也可能是单个字符"?",表示他不会算。输入输入文件包含不超过100行,以文件结束符结尾。每行包含一道题目,格式保原创 2016-07-15 23:24:04 · 1356 阅读 · 0 评论 -
[kuangbin带你飞]专题十四 数论基础-C - Aladdin and the Flying Carpet
C - Aladdin and the Flying CarpetTime Limit:3000MS Memory Limit:32768KB 64bit IO Format:%lld & %lluSubmit Status Practice LightOJ 1341 uDebugDescriptionIt's said that Aladd原创 2016-07-27 20:59:07 · 662 阅读 · 0 评论 -
2016 多校联训 第三场Teacher Bo hdoj5762
Teacher BoTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 795 Accepted Submission(s): 443Problem DescriptionTeacher BoBo is原创 2016-07-27 22:29:33 · 268 阅读 · 0 评论 -
2016 多校联训 Permutation Bo hdoj5753
把一个序列每种情况考虑一遍明显是不可能的。。。。所以把每个数的数学期望抽出来算对于在1~n两端的数来说,它出现1的概率为:其中取1~n中两个数,这两个数一定一个大一个小,因此直有一种情况,剩下的其他位置全排列,除以总可能数。化简为1/2对于2~n-1位置的数来说,他们出现1的概率为:该式的意义为在1~n中取3个数字,三个数字要呈现中间大于两边的数的情况,因此两边原创 2016-07-27 23:10:06 · 362 阅读 · 0 评论 -
2016多校联训第二场 Keep On Movin hdoj5744
偶数个的字母要配合奇数个的字母直接上代码:#include #include #include #include #include #include #include #include #include #include using namespace std;const int maxn = 100005;int save[maxn];int main(){原创 2016-07-27 23:17:13 · 409 阅读 · 0 评论 -
hdoj4497
#include #include #include #include #include using namespace std;long long g,l;int main(){ long long t,i; scanf("%lld",&t); while(t--){ scanf("%lld%lld",&g,&l); if(原创 2016-07-27 23:19:18 · 335 阅读 · 0 评论 -
hdoj5742 It's All In The Mind
#include #include #include #include #include #include #include #include #include #include using namespace std;const int maxn = 10000;int save[maxn];int gcd(int a,int b){ return b==0?原创 2016-07-27 23:21:00 · 250 阅读 · 0 评论 -
hdoj5734 Acperience
#include #include #include #include #include #include #include #include #include #include #define maxn 100005using namespace std;int save[maxn];long long gcd(long long a,long long b){原创 2016-07-27 23:22:35 · 277 阅读 · 0 评论 -
hdoj1875 畅通工程再续
#include #include #include #include #include #include #include #include #include #include using namespace std;const int minn=1e-6;int pre[105];struct unit{ int u,v; double w;原创 2016-07-27 23:24:15 · 333 阅读 · 0 评论 -
hdoj 1863 畅通工程
#include #include #include #include #include #include #include #include #include #include using namespace std;int pre[105];struct unit{ int u,v,w; int k;}village[10005];bool comp原创 2016-07-27 23:25:10 · 235 阅读 · 0 评论 -
hdoj1232 畅通工程
#include #include #include #include #include #include #include #include #include #include using namespace std;int pre[1005];bool is_root[1005];int find(int x){ int r=x; while(pre[原创 2016-07-27 23:26:02 · 387 阅读 · 0 评论 -
BestCoder 2nd Anniversary--1001Oracle
Problem DescriptionThere is once a king and queen, rulers of an unnamed city, who have three daughters of conspicuous beauty.The youngest and most beautiful is Psyche, whose admirers, neglecti原创 2016-07-18 11:18:05 · 542 阅读 · 0 评论 -
除法表达式
除法表达式时间限制:1000 ms | 内存限制:65535 KB难度:3描述 给出一个这样的除法表达式:X1/X2/X3/···/Xk,其中Xi是正整数。除法表达式应当按照从左到右的顺序求和,例如表达式1/2/1/2的值为1/4。但是可以在表达式中嵌入括号以改变计算顺序,例如表达式(1/2)/(1/2)的值为1.输入首先输原创 2016-07-19 10:25:05 · 1074 阅读 · 0 评论 -
POJ1061 青蛙的约会
使用拓展欧几里得算法使用了刘汝佳紫书上的拓展欧几里德程序,具体实现过程还是没怎么看懂。。。看懂了补上。该代码能解决一个等式问题:a*x+b*y=gcd(a,b),该算式中a,b为已知量,下面代码能得出gcd(a,b),x,y书上的代码如下:void gcd_more(long long a,long long b,long long &d,long long &x,long lon原创 2016-07-19 21:20:28 · 365 阅读 · 0 评论 -
"巴卡斯杯" 中国大学生程序设计竞赛 - 女生专场-1001-Solving Order
Solving OrderTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 352 Accepted Submission(s): 238Problem DescriptionWelcome to HDU原创 2016-07-20 01:30:42 · 639 阅读 · 0 评论 -
POJ 3349 Snowflake Snow Snowflakes
Problem DescriptionYou may have heard that no two snowflakes are alike. Your task is to write a program to determine whether this is really true. Your program will read information about a collect原创 2016-07-30 14:41:51 · 460 阅读 · 0 评论 -
hdu 1082 利用栈来处理
Problem DescriptionMatrix multiplication problem is a typical example of dynamical programming. Suppose you have to evaluate an expression like A*B*C*D*E where A,B,C,D and E are matrices. Sinc原创 2016-07-30 14:53:13 · 311 阅读 · 0 评论 -
判断满二叉树中有不同子树的节点有多少个
Problem DescriptionThere is a complete binary tree with N nodes.The subtree of the node i has Ai nodes.How many distinct numbers are there of Ai? InputThere are multiple test cases,原创 2016-07-30 14:58:27 · 1054 阅读 · 0 评论 -
poj2299 Ultra-QuickSort 树状数组
Ultra-QuickSortTime Limit: 7000MS Memory Limit: 65536KTotal Submissions: 54997 Accepted: 20235DescriptionIn this problem, you have to analyze a particular sorti原创 2016-08-03 20:50:20 · 404 阅读 · 0 评论 -
hdoj1541 stars 树状数组
Problem DescriptionAstronomers often examine star maps where stars are represented by points on a plane and each star has Cartesian coordinates. Let the level of a star be an amount of the stars t原创 2016-08-03 21:05:01 · 427 阅读 · 0 评论 -
hdoj5776 sum
sumTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 493 Accepted Submission(s): 236Problem DescriptionGiven a sequence, you'原创 2016-07-31 10:14:55 · 485 阅读 · 0 评论 -
hdu1176 免费馅饼 动态规划
免费馅饼Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 42016 Accepted Submission(s): 14452Problem Description都说天上不会掉馅饼,但有一天gameb原创 2016-08-15 17:00:02 · 486 阅读 · 0 评论 -
2016多校6 hdu5795 博弈 sg函数
A Simple NimTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 677 Accepted Submission(s): 434Problem DescriptionTwo players tak原创 2016-08-15 13:55:56 · 783 阅读 · 0 评论 -
hdu1029 Ignatius and the Princess IV 水题
Ignatius and the Princess IVTime Limit: 1000MS Memory Limit: 32767KB 64bit IO Format: %I64d & %I64uSubmit StatusDescription"OK, you are not too bad, em... But y原创 2016-08-13 13:22:14 · 443 阅读 · 0 评论 -
POJ2823 sliding window 优先队列
Problem DescriptionAn array of size n ≤ 106 is given to you. There is a sliding window of size k which is moving from the very left of the array to the very right. You can only see the knumbers in原创 2016-07-31 17:17:39 · 445 阅读 · 0 评论 -
hdoj1233 还是畅通工程
#include #include #include #include #include #include #include #include #include #include using namespace std;int pre[105];struct unit{ int u; int v; int w;}village [10005];b原创 2016-07-27 23:26:44 · 295 阅读 · 0 评论 -
刘汝佳紫书 uva1592
刘汝佳上传的代码没耐心看。。。就大致照着书上写的思路写了一个。。。一开始发现全写错了耗了半天。。。定义一个pair,这个pair里有存两个队,字符串对和int对。每每读入一行的时候看看map中是否存在这个对。自己感觉坑就是,一行中可能存在重复的字符像这样:2 4a,b,a,ba,b,c,d第一行中存在两个字符串想等但列根本不想等的两对下面是代码:#include原创 2016-08-01 20:48:45 · 1373 阅读 · 0 评论 -
Codeforces Round #365 (Div. 2) 703B Mishka and trip 水题
Mishka and triptime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputLittle Mishka is a great traveller and she v原创 2016-08-05 12:59:15 · 436 阅读 · 0 评论 -
UVA1593 Alignment of Code 数据结构
、一开始用数组写,后来发现好傻逼啊。。。。直接用stringstream来为输入的句子去空格保存单词然后用vector来储存就行了啊。。用len数组来保存每列单词的最大长度下面是代码:#include #include #include #include #include #include #include using namespace std;vecto原创 2016-08-05 19:23:28 · 284 阅读 · 0 评论 -
2016多校5 hdoj5783 Divide the Sequence
Divide the SequenceTime Limit: 5000/2500 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 424 Accepted Submission(s): 234Problem DescriptionAlice ha原创 2016-08-03 09:41:36 · 310 阅读 · 0 评论 -
hdoj5850 NanoApe Loves Sequence BestCoder Round #86
NanoApe Loves SequenceTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 262144/131072 K (Java/Others)Total Submission(s): 738 Accepted Submission(s): 334Problem DescriptionNan原创 2016-08-07 23:18:58 · 362 阅读 · 3 评论 -
HHUOJ 1013: 冒险游戏(risk_ganme) 动态规划 TWT tokyo olympic 2combo -2
1013: 冒险游戏(risk_ganme)时间限制: 2 Sec 内存限制: 2048 MB提交: 58 解决: 22[提交][状态][讨论版]题目描述河海组织一场冒险游戏,该游戏将场地分为N*M的方格,每个方格内均有一个关卡,要闯过每个关卡,都需要消耗一定数量的体力游戏的起点为(1,1) 终点为(N,M),每通过一关,可以选择右方或下方的一个关卡,顺利通过终点则挑战成功原创 2016-09-09 19:51:12 · 909 阅读 · 3 评论 -
Codeforces Round #369 (Div. 2) A B 两水题 编码能力
A题:水。。直接代码:#include #include #include #include #include using namespace std;string save[1010];int main(){ int n,i,j; scanf("%d",&n); string t; int flag = false;原创 2016-08-30 13:10:10 · 422 阅读 · 0 评论 -
HDU5806 NanoApe Loves Sequence Ⅱ BestCoder Round #86 two-pointer
NanoApe Loves Sequence ⅡTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 262144/131072 K (Java/Others)Total Submission(s): 1123 Accepted Submission(s): 498Problem Description原创 2016-08-09 10:00:10 · 427 阅读 · 0 评论 -
hdu2602 Bone Collector 01背包教学题
Bone CollectorTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 52285 Accepted Submission(s): 22035Problem DescriptionMany year原创 2016-09-01 10:44:02 · 542 阅读 · 0 评论 -
hdu2546 饭卡 01背包 贪心 TWT Tokyo Olympic--1 Combo -1
饭卡Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 23644 Accepted Submission(s): 8310Problem Description电子科大本部食堂的饭卡有一种很诡异的设计,即原创 2016-09-01 11:33:04 · 443 阅读 · 0 评论 -
Codeforces Round #367 (Div. 2) B. Interesting drink 树状数组
B. Interesting drinktime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputVasiliy likes to rest after a hard wor原创 2016-08-12 15:05:57 · 467 阅读 · 0 评论