結果
問題 | No.1447 Greedy MtSaka |
ユーザー | ninoinui |
提出日時 | 2021-04-06 18:56:17 |
言語 | C++17(gcc12) (gcc 12.3.0 + boost 1.87.0) |
結果 |
CE
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 4,080 bytes |
コンパイル時間 | 16,775 ms |
コンパイル使用メモリ | 650,356 KB |
最終ジャッジ日時 | 2024-11-15 01:00:37 |
合計ジャッジ時間 | 17,268 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
コンパイルメッセージ
In file included from /boost_git/boost/geometry/strategies/spherical/intersection.hpp:52, from /boost_git/boost/geometry/strategies/intersection_strategies.hpp:26, from /boost_git/boost/geometry/strategies/strategies.hpp:37, from /boost_git/boost/geometry/geometry.hpp:57, from /boost_git/boost/geometry.hpp:17, from main.cpp:30, from main.cpp:3: /boost_git/boost/geometry/strategies/spherical/distance_haversine.hpp: In member function 'typename boost::geometry::strategy::distance::haversine<RadiusTypeOrSphere, CalculationType>::calculation_type<Point1, Point2>::type boost::geometry::strategy::distance::haversine<RadiusTypeOrSphere, CalculationType>::apply(const Point1&, const Point2&) const': /boost_git/boost/geometry/strategies/spherical/distance_haversine.hpp:188:65: warning: declaration of 'calculation_type' shadows a member of 'boost::geometry::strategy::distance::haversine<RadiusTypeOrSphere, CalculationType>' [-Wshadow] 188 | typedef typename calculation_type<Point1, Point2>::type calculation_type; | ^~~~~~~~~~~~~~~~ /boost_git/boost/geometry/strategies/spherical/distance_haversine.hpp:150:12: note: shadowed declaration is here 150 | struct calculation_type | ^~~~~~~~~~~~~~~~ In file included from /boost_git/boost/geometry/strategies/cartesian/distance_projected_point.hpp:39, from /boost_git/boost/geometry/strategies/strategies.hpp:60: /boost_git/boost/geometry/strategies/cartesian/closest_points_pt_seg.hpp: In member function 'auto boost::geometry::strategy::closest_points::projected_point<CalculationType>::apply(const Point&, const PointOfSegment&, const PointOfSegment&) const': /boost_git/boost/geometry/strategies/cartesian/closest_points_pt_seg.hpp:133:15: warning: declaration of 'using calculation_type = typename boost::geometry::strategy:
ソースコード
#ifndef _DEBUG #define _DEBUG #include __FILE__ signed main() { int N; cin >> N; vector<point> P(N); for (int i = 0; i < N; i++) { int x, y; cin >> x >> y; P.at(i) = {x, y}; } reverse(P.begin(), P.end()); polygon poly; for (const auto& a : P) bg::append(poly, a); bg::append(poly, P.front()); cout << long(mp::round(bg::area(poly) * 2)) << "\n"; } #else // #undef _DEBUG #pragma GCC diagnostic warning "-Wextra" #pragma GCC diagnostic warning "-Wshadow" #include <bits/stdc++.h> using namespace std; #include <boost/geometry.hpp> #include <boost/multiprecision/cpp_dec_float.hpp> namespace bg = boost::geometry; namespace mp = boost::multiprecision; // typedef bg::model::d2::point_xy<mp::cpp_dec_float_50> point; typedef bg::model::point<mp::cpp_dec_float_50, 2, bg::cs::cartesian> point; typedef bg::model::segment<point> segment; typedef bg::model::linestring<point> line; typedef bg::model::ring<point> ring; typedef bg::model::box<point> box; typedef bg::model::polygon<point> polygon; struct io_setup { io_setup() { cin.tie(nullptr)->sync_with_stdio(false); } } io_setup; template <class A, class B> bool cmin(A& a, const B& b) { if (a > b) return a = b, true; return false; } template <class A, class B> bool cmax(A& a, const B& b) { if (a < b) return a = b, true; return false; } template <class A, class B> ostream& operator<<(ostream& os, const pair<A, B>& p); template <class A, class B, class C> ostream& operator<<(ostream& os, const tuple<A, B, C>& t); template <class A, class B, class C, class D> ostream& operator<<(ostream& os, const tuple<A, B, C, D>& t); #define foreach(it, a) for (auto it = a.begin(); it != a.end(); it++) ostream& operator<<(ostream& os, const vector<char>& vec) { os << "{"; foreach (it, vec) { os << (it == vec.begin() ? "" : " ") << *it; } return os << "}"; } template <class A> ostream& operator<<(ostream& os, const vector<A>& vec) { os << "{"; foreach (it, vec) { os << (it == vec.begin() ? "" : ", ") << *it; } return os << "}"; } template <class A> ostream& operator<<(ostream& os, const vector<vector<A> >& vec) { os << "{\n"; foreach (it, vec) { os << (it == vec.begin() ? " " : "\n ") << *it; } return os << "\n}"; } template <class A> ostream& operator<<(ostream& os, const vector<vector<vector<A> > >& vec) { os << "{\n"; foreach (it, vec) { os << (it == vec.begin() ? "" : "\n") << it - vec.begin() << ": " << *it; } return os << "\n}"; } template <class A> ostream& operator<<(ostream& os, const set<A>& se) { os << "{"; foreach (it, se) { os << (it == se.begin() ? "" : ", ") << *it; } return os << "}"; } template <class A> ostream& operator<<(ostream& os, const multiset<A>& ms) { os << "{"; foreach (it, ms) { os << (it == ms.begin() ? "" : ", ") << *it; } return os << "}"; } template <class A, class B> ostream& operator<<(ostream& os, const map<A, B>& ma) { os << "{"; foreach (it, ma) { os << (it == ma.begin() ? "" : ", ") << *it; } return os << "}"; } template <class A> ostream& operator<<(ostream& os, priority_queue<A> pq) { os << "{"; while (!pq.empty()) { os << pq.top(), pq.pop(); if (!pq.empty()) os << ", "; } return os << "}"; } template <class A, class B> ostream& operator<<(ostream& os, const pair<A, B>& p) { const auto& [a, b] = p; return os << "(" << a << ", " << b << ")"; } template <class A, class B, class C> ostream& operator<<(ostream& os, const tuple<A, B, C>& t) { const auto& [a, b, c] = t; return os << "(" << a << ", " << b << ", " << c << ")"; } template <class A, class B, class C, class D> ostream& operator<<(ostream& os, const tuple<A, B, C, D>& t) { const auto& [a, b, c, d] = t; return os << "(" << a << ", " << b << ", " << c << ", " << d << ")"; } void dump_func() {} template <class A, class... B> void dump_func(const A& a, const B&... b) { cout << a << (sizeof...(b) ? ", " : "\n"); dump_func(b...); } #ifdef _DEBUG #define dump(...) cout << "[" << (#__VA_ARGS__) << "]: ", dump_func(__VA_ARGS__) #else #define dump(...) #endif #endif