随笔分类 -  ACM

摘要:The interval angle between the hour hand and the minute hand is always among 0 degree and 180 degree(including 0 and 180 degree). For example, when it... 阅读全文
posted @ 2015-12-27 20:36 小白酷狗 阅读(451) 评论(0) 推荐(0)
摘要:这几天杂七杂八的事情太多,再加上进入了考试周,所以很难有时间安安静静的敲敲代码,看看书,写写博客了。最近写了一些oj的题目,但是写到这个份上,发现有些做不动了。因为自己没有很系统的看过一些算法竞赛书,所以很多时候时间复杂度和空间复杂度都控制不好,所以就想写一写前段时间买的刘汝佳的紫书,也就是《算法... 阅读全文
posted @ 2015-12-27 20:14 小白酷狗 阅读(966) 评论(0) 推荐(0)
摘要:1A.Theatre Square in the capital city of Berland has a rectangular shape with the size n × m meters. On the occasion of the city's anniversary, a deci... 阅读全文
posted @ 2015-12-26 17:09 小白酷狗 阅读(277) 评论(0) 推荐(0)
摘要:The number 151 is a prime palindrome because it is both a prime number and a palindrome (it is the same number when read forward as backward). Write a... 阅读全文
posted @ 2015-12-26 13:23 小白酷狗 阅读(874) 评论(0) 推荐(0)
摘要:Since milk packaging is such a low margin business, it is important to keep the price of the raw product (milk) as low as possible. Help Merry Milk Ma... 阅读全文
posted @ 2015-12-25 16:47 小白酷狗 阅读(414) 评论(0) 推荐(0)
摘要:4.Broken arrayDescriptionThere are n (n long long score[10005]={0};long long erratum(int n){ if(score[n]!=0) return score[n]; else{ ... 阅读全文
posted @ 2015-12-25 15:40 小白酷狗 阅读(203) 评论(0) 推荐(0)
摘要:A1000 A+B问题描述 输入A,B。 输出A+B。输入格式 输入包含两个整数A,B,用一个空格分隔。输出格式 输出一个整数,表示A+B的值。样例输入5 8样例输出13数据规模和约定 -1,000,000,000int main(){ int a,b; scanf("%d %... 阅读全文
posted @ 2015-12-23 16:04 小白酷狗 阅读(1062) 评论(0) 推荐(0)
摘要:Problem DescriptionI have a very simple problem for you. Given two integers A and B, your job is to calculate the Sum of A + B.InputThe first line of ... 阅读全文
posted @ 2015-12-23 15:52 小白酷狗 阅读(287) 评论(0) 推荐(0)
摘要:其实早就想把自己会的校赛题目总结一下,但是这段时间事情很多,刚考完英语翻译,想到这段时间把学习的重心都放在ACM上,所以是时候把最近写的一些题总结一下。先说说校赛吧:和ACM正式比赛一样,一共10道题目全英文。其实现在来看我现在会的这三道题,其实难度还称不上ACM、但是自己在比赛的时候很紧张,ID... 阅读全文
posted @ 2015-12-23 15:42 小白酷狗 阅读(232) 评论(0) 推荐(0)
摘要:因为n*(n+1)的时候数据会发生溢出,那么我们不用int 不就好了吗?233,之前不是学过long long int 吗?23333#include #include int main(){ long long int n,sum; while(scanf("%I64d",&n)!=E... 阅读全文
posted @ 2015-12-14 23:08 小白酷狗 阅读(238) 评论(0) 推荐(0)
摘要:Problem DescriptionHey, welcome to HDOJ(Hangzhou Dianzi University Online Judge). In this problem, your task is to calculate SUM(n) = 1 + 2 + 3 + ... ... 阅读全文
posted @ 2015-12-14 18:10 小白酷狗 阅读(512) 评论(0) 推荐(0)
摘要:For each pair of integers A B and C ( -2^31 #include int main(){ long long int a,b,c; while(scanf("%I64d %I64d %I64d",&a,&b,&c)==3) { printf... 阅读全文
posted @ 2015-12-14 16:30 小白酷狗 阅读(261) 评论(0) 推荐(0)
摘要:杭电第一题InputEach line will contain two integers A and B. Process to end of file.OutputFor each case, output A + B in one line.Sample Input1 1Sample Outp... 阅读全文
posted @ 2015-12-14 16:12 小白酷狗 阅读(209) 评论(0) 推荐(0)
摘要:这道题就很水啦,只要看懂题。。。所以我受了这个影响,再去hoj的时候想都没想就还按照这个打了,结果就像之前那篇说的那样WA。#include int main(){ int a,b; scanf("%d %d",&a, &b); printf("%d\n",a+b); ret... 阅读全文
posted @ 2015-12-14 15:59 小白酷狗 阅读(185) 评论(0) 推荐(0)
摘要:先说点废话:正式进入ACM大坑,瞬间就感觉到了差距之大。首先,全英文这对于我来说无疑是很大的挑战,其实这学期哈工大C语言课也有一个刷题网站sse,那个我刷到2800多分就不想刷了,实在是没意思(题目大都是基础的),也不想和自己班的那些人为了个无意义的题目一直刷较劲。所以感觉自己差不多就进入了各个OJ... 阅读全文
posted @ 2015-12-14 15:55 小白酷狗 阅读(298) 评论(0) 推荐(0)