結果
問題 |
No.467 隠されていたゲーム
|
ユーザー |
![]() |
提出日時 | 2020-04-05 15:01:05 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 4 ms / 2,000 ms |
コード長 | 671 bytes |
コンパイル時間 | 3,527 ms |
コンパイル使用メモリ | 194,508 KB |
最終ジャッジ日時 | 2025-01-09 14:14:32 |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 24 |
ソースコード
#include<bits/stdc++.h> #define ALL(v) std::begin(v),std::end(v) using lint=long long; using lubl=long double; int main(){ std::cin.tie(nullptr);std::ios_base::sync_with_stdio(false); std::cout.setf(std::ios_base::fixed);std::cout.precision(15); lint n;std::cin>>n; std::vector<lint>d(n); for(lint&e:d)std::cin>>e; lint x,y;std::cin>>x>>y; x=std::abs(x),y=std::abs(y); if(x==0&&y==0){ std::cout<<0<<'\n'; return 0; } if(std::count(ALL(d),std::max(x,y))){ std::cout<<1<<'\n'; return 0; } lint max=*std::max_element(ALL(d)); std::cout<<std::max({2ll,(x+max-1)/max,(y+max-1)/max})<<'\n'; }