結果
| 問題 | No.129 お年玉(2) |
| コンテスト | |
| ユーザー |
ninoinui
|
| 提出日時 | 2020-11-23 08:13:01 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
CE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 670 bytes |
| 記録 | |
| コンパイル時間 | 624 ms |
| コンパイル使用メモリ | 67,876 KB |
| 最終ジャッジ日時 | 2026-01-21 09:03:18 |
| 合計ジャッジ時間 | 1,641 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
コンパイルメッセージ
main.cpp:4:10: 致命的エラー: boost/multiprecision/cpp_int.hpp: そのようなファイルやディレクトリはありません
4 | #include <boost/multiprecision/cpp_int.hpp>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
コンパイルを停止しました。
ソースコード
#include <bits/stdc++.h>
using namespace std;
#include <boost/multiprecision/cpp_int.hpp>
using namespace boost::multiprecision;
using bint = cpp_int;
template <typename T, typename U> bool cmin(T &a, U b) { return a > b && (a = b, true); }
template <typename T, typename U> bool cmax(T &a, U b) { return a < b && (a = b, true); }
signed main() {
cin.tie(nullptr);
ios_base::sync_with_stdio(false);
long N, M;
cin >> N >> M;
N %= M * 1000;
N /= 1000;
auto com = [&](auto n, auto k) {
bint ret = 1;
for (int i = 0; i < k; i++) {
ret *= n - i;
ret /= i + 1;
}
return ret;
};
cout << com(M, N) % 1000000000 << "\n";
}
ninoinui