也是一道AC比較高的
感覺最近只對簡單題有feel?
盯著難題看了很久我只是想到了夜宵。。
Time Limit: 1 Second Memory Limit: 32768 KB
Given an positive integer A (1 <= A <= 100), output the lowest bit of A. For example, given A = 26, we can write A in binary form as 11010, so the lowest bit of A is 10, so the output should be 2. Another example goes like this: given A = 88, we can write A in binary form as 1011000, so the lowest bit of A is 1000, so the output should be 8. (閱讀全文…)
Time Limit: 1 Second Memory Limit: 32768 KB
In the year 2008, the 29th Olympic Games will be held in Beijing. This will signify the prosperity of China and Beijing Olympics is to be a festival for people all over the world as well.
The motto of Olympic Games is “Citius, Altius, Fortius”, which means “Faster, Higher, Stronger”.
In this problem, there are some records in the Olympic Games. Your task is to find out which one is faster, which one is higher and which one is stronger.
Input
——————————————————————————–
Time Limit: 1 Second Memory Limit: 32768 KB
——————————————————————————–
Cryptography deals with methods of secret communication that transform a message (the plaintext) into a disguised form (the ciphertext) so that no one seeing the ciphertext will be able to figure out the plaintext except the intended recipient. Transforming the plaintext to the ciphertext is encryption; transforming the ciphertext to the plaintext is decryption. Twisting is a simple encryption method that requires that the sender and recipient both agree on a secret key k, which is a positive integer.
The twisting method uses four arrays: plaintext and ciphertext are arrays of characters, and plaincode and ciphercode are arrays of integers. All arrays are of length n, where n is the length of the message to be encrypted. Arrays are origin zero, so the elements are numbered from 0 to n – 1. For this problem all messages will contain only lowercase letters, the period, and the underscore (representing a space).