摘要:
T T 让我倍感丢人的一题!几行的代码,我乱七八糟的搞了好久。%x表示十六进制输入输出。。。。。#include"stdio.h"int main(){ int num1,num2,sum; while(scanf("%x%x",&num1,&num2)!=EOF) { sum=num1+num2; printf("%d\n",sum); }} 阅读全文
摘要:
Problem C: Vito's familyBackgroundThe world-known gangster Vito Deadstone is moving to New York. He has a very big family there, all of them living in Lamafia Avenue. Since he will visit all his relatives very often, he is trying to find a house close to them.ProblemVito wants to minimize the to 阅读全文
摘要:
C: Optimal ParkingWhen shopping on Long Street, Michael usually parks his car at some random location, and then walks to the stores he needs. Can you help Michael choose a place to park which minimises the distance he needs to walk on his shopping round?<tex2html_verbatim_mark>Long Street is a 阅读全文
摘要:
Goldbach's Conjecture (II)Goldbach's Conjecture:For any even numberngreater than or equal to 4, there exists at least one pair of prime numbersp1andp2such thatn=p1+p2.This conjecture has not been proved nor refused yet. No one is sure whether this conjecture actually holds. However, one can 阅读全文
摘要:
Problem G: Simply EmirpAn integer greater than 1 is called a prime number if its only positive divisors (factors) are 1 and itself. Prime numbers have been studied over the years by a lot of mathematicians. Applications of prime numbers arise in Cryptography and Coding Theory among others.Have you t 阅读全文
摘要:
One-Two-ThreeYour little brother has just learnt to write one, two and three, in English. He has written a lot of those words in a paper, your task is to recognize them. Note that your little brother is only a child, so he may make small mistakes: for each word, there might be at most one wrong lett 阅读全文
摘要:
QueenThe ProblemThe game of Chess has several pieces with curious movements. One of them is theQueen, which can move any number of squares in any direction: in the same line, in the same column or in any of the diagonals, as illustrated by the figure below (black dots represent positions the queen m 阅读全文
摘要:
Problem IIs this the easiest problem?Time Limit : 1 second A triangle is a geometric shape with three positive sides. However, any given three sides won’t necessarily form a triangle. The three sides must form a closed region. Triangles are categorized depending on the values of the sides of a val.. 阅读全文
摘要:
Problem C: WERTYUA common typing error is to place the hands on the keyboard one row to the right of the correct position. So "Q" is typed as "W" and "J" is typed as "K" and so on. You are to decode a message typed in this manner.Input consists of several line 阅读全文
摘要:
Problem EAll in AllInput:standard inputOutput:standard outputTime Limit:2 secondsMemory Limit:32 MBYou have devised a new encryption technique which encodes a message by inserting between its characters randomly generated strings in a clever way. Because of pending patent issues we will not discuss 阅读全文
摘要:
Problem D: Beat the Spread!Superbowl Sunday is nearly here. In order to pass the time waiting for the half-time commercials and wardrobe malfunctions, the local hackers have organized a betting pool on the game. Members place their bets on the sum of the two final scores, or on the absolute differen 阅读全文
摘要:
Problem BPeter’s SmokesInput:standard inputOutput:standard outputTime Limit:4 secondsMemory Limit:32 MBPeter hasncigarettes. He smokes them one by one keeping all the butts. Out ofk> 1butts he can roll a new cigarette.How many cigarettes can Peter have?InputInput is a sequence of lines. Each line 阅读全文
摘要:
The DecoderWrite a complete program that will correctly decode a set of characters into a valid message. Your program should read a given file of a simple coded set of characters and print the exact message that the characters contain. The code key for this simple coding is a one for one character s 阅读全文
摘要:
Problem AHashmat the brave warriorInput:standard inputOutput:standard outputHashmat is a brave warrior who with his group of young soldiers moves from one place to another to fight against his opponents. Before fighting he just calculates one thing, the difference between his soldier number and the 阅读全文
摘要:
The 3n+ 1 problemBackgroundProblems in Computer Science are often classified as belonging to a certain class of problems (e.g., NP, Unsolvable, Recursive). In this problem you will be analyzing a property of an algorithm whose classification is not known for all possible inputs.The ProblemConsider t 阅读全文