結果
| 問題 | No.976 2 の 128 乗と M |
| コンテスト | |
| ユーザー |
ゆきのん
|
| 提出日時 | 2020-10-19 05:27:33 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
CE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 940 bytes |
| 記録 | |
| コンパイル時間 | 3,258 ms |
| コンパイル使用メモリ | 362,232 KB |
| 最終ジャッジ日時 | 2026-04-03 03:54:48 |
| 合計ジャッジ時間 | 4,189 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge1_1 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
コンパイルメッセージ
In file included from /usr/local/include/boost/math/policies/error_handling.hpp:15,
from /usr/local/include/boost/math/special_functions/next.hpp:19,
from /usr/local/include/boost/multiprecision/detail/default_ops.hpp:24,
from /usr/local/include/boost/multiprecision/detail/generic_interconvert.hpp:12,
from /usr/local/include/boost/multiprecision/number.hpp:12,
from /usr/local/include/boost/multiprecision/cpp_int.hpp:19,
from main.cpp:23:
/usr/local/include/boost/math/tools/tuple.hpp:81:14: error: 'template<class _T1, class _T2> constexpr std::pair<typename std::__strip_reference_wrapper<typename std::decay<_Tp>::type>::__type, typename std::__strip_reference_wrapper<typename std::decay<_Tp2>::type>::__type> std::make_pair(_T1&&, _T2&&)' conflicts with a previous declaration
81 | using ::std::make_pair;
| ^~~~~~~~~
main.cpp:8:12: note: previous declaration 'namespace boost::math::make_pair = boost::math::tools::boost::math::tools::meta_programming;'
8 | #define mp make_pair
| ^~~~~~~~~
/usr/local/include/boost/math/policies/error_handling.hpp: In function 'std::pair<_FIter, _FIter> boost::math::detail::pair_from_single(const T&)':
/usr/local/include/boost/math/policies/error_handling.hpp:1052:33: error: expected primary-expression before '(' token [-Wtemplate-body]
1052 | return boost::math::make_pair(val, val);
| ^
ソースコード
#include<bits/stdc++.h>
//#include<atcoder/all>
using namespace std;
//using namespace atcoder;
#define fs first
#define sc second
#define pb push_back
#define mp make_pair
#define eb emplace_back
#define ALL(A) A.begin(),A.end()
#define RALL(A) A.rbegin(),A.rend()
typedef long long ll;
typedef pair<ll,ll> P;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
template<typename T> T gcd(T a,T b){return b?gcd(b,a%b):a;}
const ll mod=1000000007;
const ll LINF=1ll<<60;
const int INF=1<<30;
int dx[]={1,0,-1,0,1,-1,1,-1};
int dy[]={0,1,0,-1,1,-1,-1,1};
#include<boost/multiprecision/cpp_int.hpp>
using cpp_int = boost::multiprecision::cpp_int;
int main(){
cpp_int a = 1;
for (int i = 0; i < 128; i++) {
a *= 2;
}
ll m;cin >> m;
a %= m;
cout << a << endl;
return 0;
}
ゆきのん