-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FPSの実装 #62
FPSの実装 #62
Conversation
NTTもそうなんだけど、FPS<>と書かなくていいように構造体の内部に定数を持たせるのはどうでしょう |
とりあえず先に言い訳を並べます
結論あんまりその変更は乗り気じゃないです |
怒られないマジ? int main() {
cin.tie(0);
ios::sync_with_stdio(false);
cout << fixed << setprecision(10);
vector<NTT::Int> a = {1, 2, 3};
vector<NTT::Int> b = {2, 3, 4};
NTT ntt;
cout << ntt.multiply(a, b) << endl;
return 0;
} これそっちの環境だと通りますか? |
FPSは怒られないかも |
ア NTTは無理 |
型テンプレートの中でFPS::Intみたいにすると怒られるな |
や、まあ面倒なだけなので、理由があるなら全然いいと思います |
タイプ数減らすためにconst消すか |
ヨシ! |
そんなに減らんかったのでこれなしで |
cf. #32
DONE
Math
modintのリファクタ
int
で持つようにしたpow(mod-2)
をする代わりにいい感じのコード非再帰の拡張GCD? で計算するようにした