2013年3月8日

UVA1368 - DNA Consensus String

摘要: DNA Consensus String Figure 1.DNA (Deoxyribonucleic Acid) is the molecule which contains the genetic instructions. It consists of four different nucleotides, namely Adenine, Thymine, Guanine, and Cytosine as shown in Figure 1. If we represent a n... 阅读全文

posted @ 2013-03-08 21:08 仗剑奔走天涯 阅读(368) 评论(0) 推荐(0) 编辑

SGU112 - a^b-b^a

摘要: 112. ab-batime limit per test: 0.5 sec.memory limit per test: 4096 KBYou are given natural numbers a and b. Find ab-ba.InputInput contains numbers a and b (1≤a,b≤100).OutputWrite answer to output.Sample Input2 3Sample Output-1题解:高精度乘法和高精度减法。水水的。。。不过第五个数据WA了,不知道为什么,是用函数memcmp去判断两个数组所代表的数的大小,莫名其妙的出错了, 阅读全文

posted @ 2013-03-08 19:18 仗剑奔走天涯 阅读(221) 评论(0) 推荐(0) 编辑

SGU102 - Coprimes

摘要: 102. Coprimestime limit per test: 0.5 sec.memory limit per test: 4096 KBFor given integer N (1<=N<=104) find amount of positive numbers not greater than N that coprime with N. Let us call two positive integers (say, A and B, for example) coprime if (and only if) their greatest common divisor i 阅读全文

posted @ 2013-03-08 03:32 仗剑奔走天涯 阅读(134) 评论(0) 推荐(0) 编辑

SGU101 - Domino

摘要: 101. Dominotime limit per test: 0.5 sec.memory limit per test: 4096 KBDominoes – game played with small, rectangular blocks of wood or other material, each identified by a number of dots, or pips, on its face. The blocks usually are called bones, dominoes, or pieces and sometimes men, stones, or eve 阅读全文

posted @ 2013-03-08 03:06 仗剑奔走天涯 阅读(291) 评论(0) 推荐(0) 编辑

导航