by 雨中飞燕 QQ:78803110 QQ讨论群:5305909
[url=http://bbs.bc-cn.net/viewthread.php?tid=163571]请大家不要用TC来学习C语言,点击此处查看原因[/url]
[url=http://bbs.bc-cn.net/viewthread.php?tid=162918]C++编写的Windows界面游戏[/url]
[url=http://yzfy.org/]C/C++算法习题(OnlineJudge):[/url] http://yzfy.org/
----------------解决方案--------------------------------------------------------
有一个严重的问题,我发现楼主标程第三题的代码有错误!
by 雨中飞燕 QQ:78803110 QQ讨论群:5305909
[url=http://bbs.bc-cn.net/viewthread.php?tid=163571]请大家不要用TC来学习C语言,点击此处查看原因[/url]
[url=http://bbs.bc-cn.net/viewthread.php?tid=162918]C++编写的Windows界面游戏[/url]
[url=http://yzfy.org/]C/C++算法习题(OnlineJudge):[/url] http://yzfy.org/
----------------解决方案--------------------------------------------------------
哪个地方?
----------------解决方案--------------------------------------------------------
我给你的程序只有
typedef __int64 int64;
和这个:
scanf("%I64d%I64d",&n,&m)!=EOF
不同啊!.
----------------解决方案--------------------------------------------------------
在我的测试软件上
输入5 9
输出7 5 4 3 1
连题意都不符合啊。。。
by 雨中飞燕 QQ:78803110 QQ讨论群:5305909
[url=http://bbs.bc-cn.net/viewthread.php?tid=163571]请大家不要用TC来学习C语言,点击此处查看原因[/url]
[url=http://bbs.bc-cn.net/viewthread.php?tid=162918]C++编写的Windows界面游戏[/url]
[url=http://yzfy.org/]C/C++算法习题(OnlineJudge):[/url] http://yzfy.org/
----------------解决方案--------------------------------------------------------
我前面贴的程序在VC上没有错误啊?
可能你的G++也是用%I64d把..你改一下给大家rejudge一下...
就是那个64位出了问题
把大家给害了.可怜的leeco,hjin
[此贴子已经被作者于2007-9-16 13:02:06编辑过]
----------------解决方案--------------------------------------------------------
I think the algorithm for solving the invesion prolbem is O(n^2) --- you have two for loops and I would think in the worst case scenario, you will have O(n^2).
I submitted a O(n lgn) algorithm at yzfy.org, which uses a STL set (the set brings me TLE always).
----------------解决方案--------------------------------------------------------
第三个到这里去提交吧:
http://acm.pku.edu.cn/JudgeOnline/problem?id=2085
题目是完全一样的
----------------解决方案--------------------------------------------------------
以下是引用HJin在2007-9-16 13:03:19的发言:
I think the algorithm for solving the invesion prolbem is O(n^2) --- you have two for loops and I would think in the worst case scenario, you will have O(n^2).
I submitted a O(n lgn) algorithm at yzfy.org, which uses a STL set (the set brings me TLE always).
I think the algorithm for solving the invesion prolbem is O(n^2) --- you have two for loops and I would think in the worst case scenario, you will have O(n^2).
I submitted a O(n lgn) algorithm at yzfy.org, which uses a STL set (the set brings me TLE always).
恩.
你改一下到PKU上去提交.我在那也只能70多MS
----------------解决方案--------------------------------------------------------
Rejudge了,leeco的也是AC的
by 雨中飞燕 QQ:78803110 QQ讨论群:5305909
[url=http://bbs.bc-cn.net/viewthread.php?tid=163571]请大家不要用TC来学习C语言,点击此处查看原因[/url]
[url=http://bbs.bc-cn.net/viewthread.php?tid=162918]C++编写的Windows界面游戏[/url]
[url=http://yzfy.org/]C/C++算法习题(OnlineJudge):[/url] http://yzfy.org/
[此贴子已经被作者于2007-9-16 13:16:31编辑过]
----------------解决方案--------------------------------------------------------