結果
| 問題 |
No.467 隠されていたゲーム
|
| コンテスト | |
| ユーザー |
ngtkana
|
| 提出日時 | 2020-04-05 15:00:00 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 668 bytes |
| コンパイル時間 | 2,057 ms |
| コンパイル使用メモリ | 195,324 KB |
| 最終ジャッジ日時 | 2025-01-09 14:14:23 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 22 WA * 2 |
ソースコード
#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;
if(x==0&&y==0){
std::cout<<0<<'\n';
return 0;
}
if(std::count(ALL(d),std::abs(x)+std::abs(y))){
std::cout<<1<<'\n';
return 0;
}
lint max=*std::max_element(ALL(d));
std::cout<<std::max({2ll,(std::abs(x)+max-1)/max,(std::abs(y)+max-1)/max})<<'\n';
}
ngtkana