![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
poj
文章平均质量分 71
EI_Madrigal
这个作者很懒,什么都没留下…
展开
-
1000. A+B Problem
DescriptionCalculate a+bInput Two integer a,b (0<=a,b<=10) Output Output a+bSample Input 1 2 Sample Output 3代码#include<stdio.h>int main(){ int a,b; scanf("%d %d",&a,&b); printf("%d"原创 2017-07-16 18:48:40 · 193 阅读 · 0 评论 -
2363 Blocks
/*将正方体拼成表面积最小的长方体*//*利用体积不变,暴力枚举。*/#include<iostream>#include<algorithm>using namespace std;int main(){ int C; cin >> C; while (C--) { int N; int cnt = 0; ci原创 2017-08-25 16:58:41 · 177 阅读 · 0 评论 -
2365 Rope
DescriptionPlotters have barberically hammered N nails into an innocent plane shape, so that one can see now only heads. Moreover, pursuing their mean object, they have hammered all the nails into the原创 2017-08-25 19:31:38 · 241 阅读 · 0 评论 -
1003 Hangover
DescriptionHow far can you make a stack of cards overhang a table? If you have one card, you can create a maximum overhang of half a card length. (We’re assuming that the cards must be perpendicular to原创 2017-08-22 17:35:17 · 195 阅读 · 0 评论 -
1269 Intersecting Lines
DescriptionWe all know that a pair of distinct points on a plane defines a line and that a pair of lines on a plane will intersect in one of three ways: 1) no intersection because they are parallel, 2)原创 2017-08-22 19:22:05 · 164 阅读 · 0 评论 -
2242 The Circumference of the Circle
DescriptionTo calculate the circumference of a circle seems to be an easy task - provided you know its diameter. But what if you don’t?You are given the cartesian coordinates of three non-collinear poi原创 2017-08-26 10:40:42 · 217 阅读 · 0 评论 -
2291 Rotten Ropes
DescriptionSuppose we have n ropes of equal length and we want to use them to lift some heavy object. A tear-off weight t is associated to each rope, that is, if we try to lift an object, heavier than原创 2017-08-26 14:54:36 · 236 阅读 · 0 评论 -
1299 Polar Explorer
DescriptionYou are a intrepid 2-dimensional explorer located at the northern polar reaches of a distant 2-dimensional planet. Unfortunately, you have been assigned to explore the most boring planet in原创 2017-09-04 20:46:22 · 527 阅读 · 0 评论 -
1401 Factorial
DescriptionThe most important part of a GSM network is so called Base Transceiver Station (BTS). These transceivers form the areas called cells (this term gave the name to the cellular phone) and every原创 2017-08-23 20:45:14 · 199 阅读 · 0 评论 -
1410 Intersection
DescriptionYou are to write a program that has to decide whether a given line segment intersects a given rectangle. An example: line: start point: (4,9) end point: (11,2) rectangle: left-top: (1,原创 2017-08-24 14:38:37 · 167 阅读 · 0 评论 -
1799 Yeehaa!
DescriptionBackground George B. wants to be more than just a good American. He wants to make his daddy proud and become a western hero. You know, like John Wayne. But sneaky as he is, he wants a sp原创 2017-09-10 13:09:56 · 316 阅读 · 0 评论 -
1254 Hansel and Grethel
DescriptionOn a warm summer afternoon, Hansel and Grethel are walking together in the fields. It is getting late and, to be honest, they are lost. Grethel is a little scared, still vividly remembering原创 2017-08-22 17:20:43 · 313 阅读 · 0 评论 -
1183 反正切函数的应用
Description反正切函数可展开成无穷级数,有如下公式 (其中0 <= x <= 1) 公式(1) 使用反正切函数计算PI是一种常用的方法。例如,最简单的计算PI的方法: PI=4arctan(1)=4(1-1/3+1/5-1/7+1/9-1/11+…) 公式(2) 然而,这种方法的效率很低,但我们可以根据角度和的正切函数公式: tan(a+b)=[tan(a)+原创 2017-09-03 23:40:42 · 534 阅读 · 0 评论 -
1045. Bode Plot
题目链接: http://poj.org/problem?id=1045思路: v2=iR=CRd(v1−v2)/dtv_2=iR=CRd(v_1-v_2)/dt dv1/dt=−wVssin(wt)dv_1/dt=-wV_ssin(wt) dv2/dt=−WVRsin(wt+θ)dv_2/dt=-WV_Rsin(wt+\theta) 所以有:v2=CRw(VRsin(wt+θ)−Vssi原创 2017-08-21 10:19:52 · 319 阅读 · 0 评论 -
3299. Humidex
DescriptionAdapted from Wikipedia, the free encyclopediaThe humidex is a measurement used by Canadian meteorologists to reflect the combined effect of heat and humidity. It differs from the heat index原创 2017-07-17 09:00:30 · 345 阅读 · 0 评论 -
2159. Ancient Cipher
这道题误导性较强:一般我们会从original message出发,先进行substitution cipher,再permutation cipher。问题的关键在于:对于实际中的密文,我们很难找出permutation cipher的加密序列,所以很难破解。换一种思路:破解substitution cipher后,密文和所猜测的明文仅仅是调换了顺序而已。所以将密文和所猜测的明文都看做是随机序列,之后对其中的每原创 2017-07-17 09:15:00 · 199 阅读 · 0 评论 -
2739. Sum of Consecutive Prime Numbers
DescriptionSome positive integers can be represented by a sum of one or more consecutive prime numbers. How many such representations does a given positive integer have? For example, the integer 53 has原创 2017-07-18 09:44:37 · 196 阅读 · 0 评论 -
1083. Moving Tables
DescriptionThe famous ACM (Advanced Computer Maker) Company has rented a floor of a building whose shape is in the following figure. The floor has 200 rooms each on the north side and south side alon原创 2017-07-18 12:20:09 · 166 阅读 · 0 评论 -
1503. Integer Inquiry
DescriptionOne of the first users of BIT’s new supercomputer was Chip Diller. He extended his exploration of powers of 3 to go from 0 to 333 and he explored taking various sums of those numbers. This原创 2017-07-21 18:28:40 · 219 阅读 · 0 评论 -
2262. Goldbach's Conjecture
DescriptionIn 1742, Christian Goldbach, a German amateur mathematician, sent a letter to Leonhard Euler in which he made the following conjecture: Every even number greater than 4 can be written as原创 2017-07-18 18:39:49 · 258 阅读 · 0 评论 -
3006. Dirichlet's Theorem on Arithmetic Progressions
DescriptionIf a and d are relatively prime positive integers, the arithmetic sequence beginning with a and increasing by d, i.e., a, a + d, a + 2d, a + 3d, a + 4d, …, contains infinitely many prime num原创 2017-07-22 09:53:23 · 207 阅读 · 0 评论 -
3094. Quicksum
DescriptionA checksum is an algorithm that scans a packet of data and returns a single number. The idea is that if the packet is changed, the checksum will also change, so checksums are often used for原创 2017-07-22 12:59:31 · 225 阅读 · 0 评论 -
1019. Number Sequence
DescriptionA single positive integer i is given. Write a program to find the digit located in the position i in the sequence of number groups S1S2…Sk. Each group Sk consists of a sequence of positive i原创 2017-07-27 17:37:30 · 230 阅读 · 0 评论 -
3252. Round Numbers
DescriptionThe cows, as you know, have no fingers or thumbs and thus are unable to play Scissors, Paper, Stone’ (also known as ‘Rock, Paper, Scissors’, ‘Ro, Sham, Bo’, and a host of other names) in ord原创 2017-07-27 18:38:07 · 150 阅读 · 0 评论 -
扩展欧几里得算法(POJ 1061)
分析可知,该题只需求解同余方程(x+am)(x+am)%L=(y+an)L=(y+an)%LL最小的a即可。 对方程变形可得 a∗(m−n)+k∗L=y−xa*(m-n)+k*L=y-x , k为一整数 令p=m−n,q=y−xp=m-n,q=y-x,有:a∗p+k∗L=qa*p+k*L=q (1) (1)式即为扩展欧原创 2017-10-17 12:26:49 · 216 阅读 · 0 评论