萌新求助,本地 AC,提交 CE

P4777 【模板】扩展中国剩余定理(EXCRT)

int128不能用scanf,只能用快读快写
by hly_shen @ 2023-08-08 14:09:30


@[shenshen](/user/510830) 是可以的。 有人用 int128 scanf过掉了这道题。
by lemon_qwq @ 2023-08-08 14:10:39


报错的原因是 `abs` 不明确,建议自己写一个。 比如 `int Abs(int x) { return x < 0 ? -x : x; }` 同时编译器还给出一个警告:`%lld` 用于 `long long int` 而非 `__int128`。我自己没用过不知道有没有影响(
by Kedit2007 @ 2023-08-08 14:12:11


@[lemon_qwq](/user/610335) 那个大佬用int128过的?
by CuFeO4 @ 2023-08-08 14:12:17


@[lemon_qwq](/user/610335) ![](https://cdn.luogu.com.cn/upload/image_hosting/2cx2q2rf.png)
by hzoi_Shadow @ 2023-08-08 14:12:54


@[CuFeO4](/user/752441) S喵
by lemon_qwq @ 2023-08-08 14:13:13


@[CuFeO4](/user/752441) 提交记录
by hzoi_Shadow @ 2023-08-08 14:13:36


@[Kedit2007](/user/578972) 已经解决,确实是 abs 的问题,谢谢。
by lemon_qwq @ 2023-08-08 14:13:49


本地编译没有问题是因为scanf把int128转换成了longlong,建议用快读快写
by CuFeO4 @ 2023-08-08 14:14:22


@[The_Shadow_Dragon](/user/848964) 但是只改了 abs 就过了。
by lemon_qwq @ 2023-08-08 14:14:24


| 下一页