結果
| 問題 |
No.2461 一点張り
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-10-19 01:11:52 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 4 ms / 2,000 ms |
| コード長 | 967 bytes |
| コンパイル時間 | 5,486 ms |
| コンパイル使用メモリ | 308,888 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-10-19 01:11:59 |
| 合計ジャッジ時間 | 6,466 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 7 |
ソースコード
#include<bits/stdc++.h>
#include<atcoder/all>
namespace my{
void main();
void solve();
}
int main(){my::main();}
namespace my{
#define RD(T,...) T __VA_ARGS__;lin(__VA_ARGS__)
#define LL(...) ll __VA_ARGS__;lin(__VA_ARGS__)
#define FO(n) for(ll ij=n;ij--;)
#define FOR(i,...) for(auto[i,i##stop,i##step]=range(0,__VA_ARGS__);i<i##stop;i+=i##step)
#define fo(i,...) FO##__VA_OPT__(R)(i __VA_OPT__(,__VA_ARGS__))
using namespace std;
using dd=long double;
using ll=long long;
auto range(bool s,ll a,ll b=1e18,ll c=1){if(b==1e18)b=a,(s?b:a)=0;return array{a-s,b,c};}
constexpr char nl=10;
constexpr char sp=32;
void io(){cin.tie(nullptr)->sync_with_stdio(0);cout<<fixed<<setprecision(15);}
void lin(auto&...a){(cin>>...>>a);}
template<char c=sp>void pp(const auto&...a){ll n=sizeof...(a);((cout<<a<<string(--n>0,c)),...);cout<<nl;}
void main(){io();ll T=1;fo(T)solve();}
void solve(){
LL(T);
fo(T){
RD(dd,p);
LL(K);
pp(p==0?K:(1-pow(1-p,K))/p);
}
}}