- 博客(36)
- 收藏
- 关注
原创 Happy 2004
链接:http://acm.hust.edu.cn/vjudge/problem/40652/origin题目:Consider a positive integer X,and let S be the sum of all positive integer divisors of 2004^X. Your job is to determine S modulo 29 (the res
2016-08-31 21:36:01 278
原创 abs
链接:http://acm.hust.edu.cn/vjudge/problem/440426/origin题目:Given a number x, ask positive integer , that satisfy the following conditions: 1. The absolute value of y - x is minimal 2. To prim
2016-08-31 21:29:54 195
原创 Looooops
链接:http://acm.hust.edu.cn/vjudge/problem/21464/origin题目:A Compiler Mystery: We are given a C-language style for loop of type for (variable = A; variable != B; variable += C) statement;I.e
2016-08-31 21:24:36 242
原创 青蛙的约会
链接:http://acm.hust.edu.cn/vjudge/problem/10755/origin题目:两只青蛙在网上相识了,它们聊得很开心,于是觉得很有必要见一面。它们很高兴地发现它们住在同一条纬度线上,于是它们约定各自朝西跳,直到碰面为止。可是它们出发之前忘记了一件很重要的事情,既没有问清楚对方的特征,也没有约定见面的具体位置。不过青蛙们都是很乐观的,它们觉得只要一直朝着某个方
2016-08-31 21:17:36 152
原创 Find a multiple
链接:http://acm.hust.edu.cn/vjudge/problem/17962/origin题目:The input contains N natural (i.e. positive integer) numbers ( N <= 10000 ). Each of that numbers is not greater than 15000. This numbers ar
2016-08-31 21:12:43 177
原创 Prime Land
链接:http://acm.hust.edu.cn/vjudge/problem/21459/origin题目:Everybody in the Prime Land is using a prime base number system. In this system, each positive integer x is represented as follows: Let {pi}
2016-08-31 20:41:17 295
原创 Digit Primes
链接:http://acm.hust.edu.cn/vjudge/problem/25171/origin题目:A prime number is a positive number, which is divisible by exactly two different integers. A digit primeis a prime number whose sum
2016-08-31 20:25:25 424
原创 人见人爱A^B
链接:http://acm.hust.edu.cn/vjudge/problem/17489/origin题目:求A^B的最后三位数表示的整数。 说明:A^B的含义是“A的B次方”题意:。分析:这是数论里面的模运算定理,模运算在加减乘三运算中满足分配律,可以任意分配,注意除法不可以用分配律,在遇到除法时要用群概念中的逆元来变成乘法。此外i,本体要用快速幂来优化。
2016-08-31 20:17:49 149
原创 整除的尾数
链接:http://acm.hust.edu.cn/vjudge/problem/23629/origin题目:一个整数,只知道前几位,不知道末二位,被另一个整数除尽了,那么该数的末二位该是什么呢?题意:。。分析:数论里面简单的水题一般就是暴力了。这道题主要坑在了有只有个位的情况,需要变成两位输出。题解:#include #include #include #
2016-08-31 20:11:54 269
原创 七夕节
链接:http://acm.hust.edu.cn/vjudge/problem/22310/origin题目:七夕节那天,月老来到数字王国,他在城门上贴了一张告示,并且和数字王国的人们说:"你们想知道你们的另一半是谁吗?那就按照告示上的方法去找吧!" 人们纷纷来到告示前,都想知道谁才是自己的另一半.告示如下: 数字N的因子就是所有比N小又能被N整除的所有正整数
2016-08-31 20:05:19 175
原创 Nearest Common Ancestors
链接:http://poj.org/problem?id=1330题目:A rooted tree is a well-known data structure in computer science and engineering. An example is shown below:In the figure, each node is labeled with a
2016-08-30 21:34:42 351
原创 Frequent values
链接:http://poj.org/problem?id=3368题目:You are given a sequence of n integers a1 , a2 , ... , an in non-decreasing order. In addition to that, you are given several queries consisting of indicesi a
2016-08-30 20:09:37 230
原创 Matrix
链接:http://poj.org/problem?id=2155题目:Given an N*N matrix A, whose elements are either 0 or 1. A[i, j] means the number in the i-th row and j-th column. Initially we have A[i, j] = 0 (1 <= i, j <= N
2016-08-30 14:50:55 430
原创 Ultra-QuickSort
链接:http://poj.org/problem?id=2299题目:In this problem, you have to analyze a particular sorting algorithm. The algorithm processes a sequence of n distinct integers by swapping two adjacent sequence
2016-08-30 13:55:31 215
原创 Stars
链接:http://poj.org/problem?id=2352题目:Astronomers 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 amou
2016-08-30 13:43:26 208
原创 Japan
链接:http://poj.org/problem?id=3067题目:Japan plans to welcome the ACM ICPC World Finals and a lot of roads must be built for the venue. Japan is tall island with N cities on the East coast and M citi
2016-08-30 13:24:27 866
原创 NanoApe Loves Sequence Ⅱ
链接:http://acm.split.hdu.edu.cn/showproblem.php?pid=5806题目:NanoApe, the Retired Dog, has returned back to prepare for for the National Higher Education Entrance Examination!In math class, Nan
2016-08-30 10:13:45 410
原创 畅通工程
链接:http://acm.split.hdu.edu.cn/showproblem.php?pid=1232题目:某省调查城镇交通状况,得到现有城镇道路统计表,表中列出了每条道路直接连通的城镇。省政府“畅通工程”的目标是使全省任何两个城镇间都可以实现交通(但不一定有直接的道路相连,只要互相间接通过道路可达即可)。问最少还需要建设多少条道路?题意:中文。分析:乍一看好像是图
2016-08-29 16:06:28 294
原创 More Cowbell
链接:http://codeforces.com/problemset/problem/604/B题目:Kevin Sun wants to move his precious collection of n cowbells from Naperthrill to Exeter, where there is actually grass instead of corn. B
2016-08-29 15:56:27 348
原创 Disharmony Trees
链接:http://acm.split.hdu.edu.cn/showproblem.php?pid=3015题目:One day Sophia finds a very big square. There are n trees in the square. They are all so tall. Sophia is very interesting in them.
2016-08-29 15:39:48 293
原创 敌兵布阵
链接:http://acm.split.hdu.edu.cn/showproblem.php?pid=1166题目:C国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了。A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务就是要监视这些工兵营地的活动情况。由于采取了某种先进的监测手段,所以每个工兵营地的人数C国都掌握的一清二楚
2016-08-29 14:56:35 262
原创 Making a String
链接:http://codeforces.com/problemset/problem/624/B题目:You are given an alphabet consisting of n letters, your task is to make a string of the maximum possible length so that the following cond
2016-08-29 14:51:49 303
原创 A Problem about Polyline
链接:题目:There is a polyline going through points (0, 0) – (x, x) – (2x, 0) – (3x, x) – (4x, 0) – ... - (2kx, 0) – (2kx + x, x) – ....We know that the polyline passes through the point (a,
2016-08-28 18:46:24 427
原创 "Or" Game
链接:http://codeforces.com/problemset/problem/579/D题目:You are given n numbers a1, a2, ..., an. You can perform at mostk operations. For each operation you can multiply one of the numbers b
2016-08-28 18:36:47 362
原创 Fix a Tree
链接:http://codeforces.com/problemset/problem/699/D题目:A tree is an undirected connected graph without cycles.Let's consider a rooted undirected tree with n vertices, numbered1 through n. T
2016-08-28 18:16:42 282
原创 Vacations
链接:http://codeforces.com/problemset/problem/699/C题目:Vasya has n days of vacations! So he decided to improve his IT skills and do sport. Vasya knows the following information about each of th
2016-08-28 18:05:56 276
原创 One Bomb
链接:题目:You are given a description of a depot. It is a rectangular checkered field ofn × m size. Each cell in a field can be empty (".") or it can be occupied by a wall ("*").You have o
2016-08-28 17:58:48 296
原创 Launch of Collider
链接:http://codeforces.com/problemset/problem/699/A题目:There will be a launch of a new, powerful and unusual collider very soon, which located along a straight line.n particles will be launch
2016-08-28 17:53:56 305
原创 Crime and Punishment
链接:http://acm.timus.ru/problem.aspx?space=1&num=1430题目:BackgroundPetty bureaucrat Victor Thiefton was disposed towards stealing from his childhood. But one thing is to legally privatize na
2016-08-28 17:44:05 356
原创 快算24
链接:http://poj.org/problem?id=3983题目:很多同学都玩过24点的游戏,现在计算机给出如下4个数,输出计算得到24点的公式,Input计算机给出的四个数是:5 5 1 5Output不改变位置顺序,由'+','-','*','/'4个运算符和'(',')'组成的表达式题意:不知道怎么吐槽合适
2016-08-28 17:41:25 1129 2
原创 Fourth Point !!
链接:https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1183题目:Given are the (x;y) coordinates of the endpoints of two adjacent sides of a pa
2016-08-28 16:08:34 636
原创 Maximum Sum
链接:http://acm.timus.ru/problem.aspx?space=1&num=1146题目:Given a 2-dimensional array of positive and negative integers, find the sub-rectangle with the largest sum. The sum of a rectangle is the sum
2016-08-28 15:56:56 358
原创 Chess
链接:http://codeforces.com/problemset/problem/38/B题目:Two chess pieces, a rook and a knight, stand on a standard chessboard 8 × 8 in size. The positions in which they are situated are known. It i
2016-08-28 15:20:48 380
原创 Lucky Numbers (easy)
链接:http://codeforces.com/problemset/problem/96/BPetya loves lucky numbers. Everybody knows that positive integers are lucky if their decimal representation doesn't contain digits other than 4
2016-08-28 15:10:05 651
原创 Metro
http://acm.timus.ru/problem.aspx?space=1&num=1119Many of SKB Kontur programmers like to get to work by Metro because the main office is situated quite close the station Uralmash. So, since
2016-08-28 15:01:41 349
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人