正在加载...

随遇而安

传递互联网信息,共享互联网资源。

极限优化的编程题目

Posted by admin on 2008-12-27

极限优化题目:
1 2 3 4 5 6 7 8 9 10 11 = N
其中N是运行时输入的一个整数,在以上式子左边加入+-*/使得式子成立
若解的个数超过50个时请自行终止解的输出(只输出前50个),
最后要输出解的总个数(不显示的也要统计在内)
1前面加不加负号都要考虑
时间限制3s例子: (全文…)

C/C++ Programming Challenge – try this!

Posted by admin on 2008-10-12

Today I have met a C programming problem on the one of the foreign websites, this is a funny problem,maybe you can challenge it : wishes !!!

Here’s a puzzle for those who still have brain intact:-
Write a function that takes a string as input, and outputs that string with the words in reverse order. Punctuation should remain in its place (i.e. attached to whatever word it was originally with) (全文…)