結果
問題 | No.2140 Triangle |
ユーザー | Sarievo |
提出日時 | 2022-12-02 21:57:13 |
言語 | C++17 (gcc 13.2.0 + boost 1.83.0) |
結果 |
CE
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 2,705 bytes |
コンパイル時間 | 4,781 ms |
コンパイル使用メモリ | 256,448 KB |
最終ジャッジ日時 | 2024-04-18 05:51:03 |
合計ジャッジ時間 | 5,229 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
コンパイルメッセージ
In file included from /home/linuxbrew/.linuxbrew/Cellar/gcc/13.2.0/include/c++/13/string:43, from /home/linuxbrew/.linuxbrew/Cellar/gcc/13.2.0/include/c++/13/bitset:52, from /home/linuxbrew/.linuxbrew/Cellar/gcc/13.2.0/include/c++/13/x86_64-pc-linux-gnu/bits/stdc++.h:52, from main.cpp:4: /home/linuxbrew/.linuxbrew/Cellar/gcc/13.2.0/include/c++/13/bits/allocator.h: In destructor 'std::_Bvector_base<std::allocator<bool> >::_Bvector_impl::~_Bvector_impl()': /home/linuxbrew/.linuxbrew/Cellar/gcc/13.2.0/include/c++/13/bits/allocator.h:184:7: error: inlining failed in call to 'always_inline' 'std::allocator< <template-parameter-1-1> >::~allocator() noexcept [with _Tp = long unsigned int]': target specific option mismatch 184 | ~allocator() _GLIBCXX_NOTHROW { } | ^ In file included from /home/linuxbrew/.linuxbrew/Cellar/gcc/13.2.0/include/c++/13/vector:67, from /home/linuxbrew/.linuxbrew/Cellar/gcc/13.2.0/include/c++/13/functional:64, from /home/linuxbrew/.linuxbrew/Cellar/gcc/13.2.0/include/c++/13/x86_64-pc-linux-gnu/bits/stdc++.h:53: /home/linuxbrew/.linuxbrew/Cellar/gcc/13.2.0/include/c++/13/bits/stl_bvector.h:557:14: note: called from here 557 | struct _Bvector_impl | ^~~~~~~~~~~~~
ソースコード
// @Sarievo, URL: https://yukicoder.me/problems/no/2140 #pragma GCC target("avx2") #pragma GCC optimize("O3","unroll-loops") #include <bits/stdc++.h> using namespace std; // --- Library --- #if __has_include(<atcoder/all>) #include <atcoder/all> using namespace atcoder; // using mint=modint998244353; using mint=modint1000000007; #endif // --- Type and Alias --- #define a first #define b second #include <ext/pb_ds/tree_policy.hpp> #include <ext/pb_ds/assoc_container.hpp> using namespace __gnu_pbds; // find_by_order() - kth largest (0-indexed) // order_of_key() - count(Si < k) template<class T> using indexed_set=tree<T,null_type,less<T>,rb_tree_tag,tree_order_statistics_node_update>; template<class T> using indexed_multiset=tree<T,null_type,less_equal<T>,rb_tree_tag,tree_order_statistics_node_update>; template<class T> using v=vector<T>; template<class T> using vv=v<v<T>>; template<class T> using minheap=priority_queue<T,v<T>,greater<T>>; template<class T> using maxheap=priority_queue<T,v<T>,less<T>>; using ll=long long; using ld=long double; using vl=v<ll>; using vvl=vv<ll>; using pl=pair<ll,ll>; using vp=v<pl>; // --- IO --- template<typename T> istream&operator>>(istream&is, pair<T,T>&p){is>>p.a>>p.b;return is;} template<typename T> ostream&operator<<(ostream&os, pair<T,T>&p){os<<p.a<<" "<<p.b;return os;} template<typename T> istream&operator>>(istream&is, v<T>&a){for(auto&e:a)is>>e;return is;} template<typename T> ostream&operator<<(ostream&os, v<T>&a){for(auto&e:a)os<<e<<" ";return os;} #define Nyan ios_base::sync_with_stdio(0);std::cin.tie(0);std::cout.tie(0);std::cout<<fixed; // --- Macro --- #define reps(i,start,end_exclusive) for(ll i=(ll)(start);i<(ll)(end_exclusive);++i) #define rep(i,end_exclusive) reps(i,0,end_exclusive) #define sum(a) accumulate(all(a),0ll) #define fore(e,a) for(auto&e:a) #define all(a) (a).begin(),(a).end() #define rall(a) (a).rbegin(),(a).rend() template<class T> auto min(const T&a){return *min_element(all(a));} template<class T> auto max(const T&a){return *max_element(all(a));} template<class T,class U> bool chmax(T&x,const U&y){return x<y?x=y,1:0;} template<class T,class U> bool chmin(T&x,const U&y){return x>y?x=y,1:0;} template<typename T> inline T abs(const T&x){return (x<0?-x:x);} template<typename T> inline T sqr(const T&x){return (x*x);} void yes(bool x){std::cout<<(x?"yes":"no")<<endl;} void Yes(bool x){std::cout<<(x?"Yes":"No")<<endl;} void YES(bool x){std::cout<<(x?"YES":"NO")<<endl;} // --- Vars --- // R D L U DR DL UL UR ll dx[]{+0,+1,+0,-1,+1,+1,-1,-1}; ll dy[]{+1,+0,-1,+0,+1,-1,-1,+1}; /* a < b < c */ void solve(){ ll a; cin >> a; cout << a * 2 - 1 << endl; } signed main(){ Nyan; solve(); }