摘要: 甲乙用同一串数字玩游戏,一共15个,一开始这些数不是严格升序的,甲去掉一个数据,如果严格升序了,甲胜利,否则由乙继续去掉一个数据,如果严格升序了,乙胜利,否则再由甲删除数据,如此往复。通过15个初始数据,判断甲胜还是乙胜。#include#includeusing namespace std;boo... 阅读全文
posted @ 2014-08-21 17:08 米其林轮船 阅读(186) 评论(0) 推荐(0) 编辑
摘要: Given a infinite number of quarters(25cents), dimens(10cents), nickels(5cents) and pennies(1cent), write code to calculate the number of ways of repre... 阅读全文
posted @ 2014-08-21 11:24 米其林轮船 阅读(115) 评论(0) 推荐(0) 编辑
摘要: Implement an algorithm to print all valid combinations of n-pairs of parentheses#includevoid f(int idx,int left,int right,char *buf){ if(left == 0 ... 阅读全文
posted @ 2014-08-21 11:17 米其林轮船 阅读(159) 评论(0) 推荐(0) 编辑