摘要:
虽然题意简单,但是注意的细节还是不少。1、必须满足能刚好付这么多钱。2、尽可能先把1毛的用完3、在2的基础上把5毛的用完4、用10的时候,保证sum是10的倍数,否则先去掉5个1毛,没有1毛再去5毛。。。View Code 1 #include<stdio.h> 2 int main(){ 3 int sum,x1,x5,x10; 4 int a,b,c; 5 while( scanf("%d%d%d%d",&sum,&x1,&x5,&x10)!=EOF && ( sum||x1||x5||x10) ){ 6 a 阅读全文
posted @ 2013-05-05 19:47
xxx0624
阅读(317)
评论(0)
推荐(0)
摘要:
《转》Know Thy Complexities!Hi there! This webpage covers the space and time Big-O complexities of common algorithms used in Computer Science. When preparing for technical interviews in the past, I found myself spending hours crawling the internet putting together the best, average, and worst case comp 阅读全文
posted @ 2013-05-05 12:53
xxx0624
阅读(183)
评论(0)
推荐(0)