結果
問題 |
No.2091 Shio Ramen (Easy)
|
ユーザー |
|
提出日時 | 2022-12-19 00:36:24 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
CE
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 676 bytes |
コンパイル時間 | 4,689 ms |
コンパイル使用メモリ | 326,168 KB |
最終ジャッジ日時 | 2025-01-25 15:38:29 |
合計ジャッジ時間 | 5,415 ms |
ジャッジサーバーID (参考情報) |
judge7 / judge8 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
コンパイルメッセージ
In file included from /usr/include/c++/13/string:43, from /usr/include/c++/13/bitset:52, from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:52, from main.cpp:4: /usr/include/c++/13/bits/allocator.h: In destructor ‘constexpr std::_Bvector_base<std::allocator<bool> >::_Bvector_impl::~_Bvector_impl()’: /usr/include/c++/13/bits/allocator.h:184:7: error: inlining failed in call to ‘always_inline’ ‘constexpr 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 /usr/include/c++/13/vector:67, from /usr/include/c++/13/functional:64, from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:53: /usr/include/c++/13/bits/stl_bvector.h:590:14: note: called from here 590 | struct _Bvector_impl | ^~~~~~~~~~~~~
ソースコード
#pragma GCC target("avx2") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") #include<bits/stdc++.h> using namespace std; typedef long long ll; typedef long long ull; constexpr int dx[]={1,0,0,-1},dy[]={0,1,-1,0}; constexpr int Dx[]={1,1,0,-1,-1,-1,0,1},Dy[]={0,1,1,1,0,-1,-1,-1}; constexpr int mod=998244353,Mod=1e9+7,inf=Mod; constexpr ll linf=(ll)inf*inf; //* #include<atcoder/all> using namespace atcoder; //*/ int main(){ int n,s,k,a[10]; cin>>n>>s>>k; for(int i=0;i<n;i++) cin>>a[i]; pair<int,int>di[10]; for(int i=0;i<n;i++) di[i]={abs(a[i]-s),i}; sort(di,di+n); if(di[0].first>k) cout<<"Unlucky!"<<endl; else cout<<di[0].second+1<<endl; }