遇到一个代码上的问题,急!

学术版

@[Cyx20110930](/user/667017) 报错信息是什么
by WZRYWZWY @ 2024-04-04 20:03:47


Received signal 8: Floating-point exception. @[WZRYWZWY](/user/704668)
by Cyx20110930 @ 2024-04-04 20:04:21


@[Cyx20110930](/user/667017) 嗯,不过我这里是可以编译过的。 ------------ 原本打算翻译一下,结果…… ![](https://cdn.luogu.com.cn/upload/image_hosting/y8blxcd2.png) ~~奇怪的百度~~ @[Cyx20110930](/user/667017)
by WZRYWZWY @ 2024-04-04 20:09:13


@[WZRYWZWY](/user/704668) 本来这题是比赛用题,但是我给你看一下提交记录吧
by Cyx20110930 @ 2024-04-04 20:10:18


https://www.luogu.com.cn/problem/U419715 此题 @[WZRYWZWY](/user/704668)
by Cyx20110930 @ 2024-04-04 20:11:09


https://www.luogu.com.cn/record/154291930 提交记录
by Cyx20110930 @ 2024-04-04 20:11:41


是 RE。
by Cyx20110930 @ 2024-04-04 20:12:09


@[Cyx20110930](/user/667017) p,q可能都为0,这样就会出错
by WZRYWZWY @ 2024-04-04 20:13:50


我造的数据里没有啊。 @[WZRYWZWY](/user/704668)
by Cyx20110930 @ 2024-04-04 20:14:29


```cpp #include<iostream> using namespace std; int main() { freopen("t9(1).in","w",stdout); cout<<"55 5 3 1"; freopen("t9(1).out","w",stdout); cout<<"NO"; freopen("t9(2).in","w",stdout); cout<<"100000000000000000000 100000000000000000000 1 0"; freopen("t9(2).out","w",stdout); cout<<"YES"; freopen("t9(3).in","w",stdout); cout<<"8 7 1 2"; freopen("t9(3).out","w",stdout); cout<<"YES"; freopen("t9(4).in","w",stdout); cout<<"100000000000000000000 10 1 1"; freopen("t9(4).out","w",stdout); cout<<"NO"; } ```
by Cyx20110930 @ 2024-04-04 20:15:10


| 下一页