結果
| 問題 | No.456 Millions of Submits! |
| コンテスト | |
| ユーザー |
rickytheta
|
| 提出日時 | 2016-12-07 22:20:05 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,243 bytes |
| 記録 | |
| コンパイル時間 | 1,418 ms |
| コンパイル使用メモリ | 157,596 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-06-23 02:35:31 |
| 合計ジャッジ時間 | 4,508 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 1 WA * 12 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:54:8: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
54 | scanf("%d",&m);
| ~~~~~^~~~~~~~~
main.cpp: In function ‘void solve()’:
main.cpp:36:8: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
36 | scanf("%lf%lf%lf",&a,&b,&t);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef int _loop_int;
#define REP(i,n) for(_loop_int i=0;i<(_loop_int)(n);++i)
#define FOR(i,a,b) for(_loop_int i=(_loop_int)(a);i<(_loop_int)(b);++i)
#define FORR(i,a,b) for(_loop_int i=(_loop_int)(b)-1;i>=(_loop_int)(a);--i)
#define DEBUG(x) cout<<#x<<": "<<x<<endl
#define DEBUG_VEC(v) cout<<#v<<":";REP(i,v.size())cout<<" "<<v[i];cout<<endl
#define ALL(a) (a).begin(),(a).end()
#define CHMIN(a,b) a=min((a),(b))
#define CHMAX(a,b) a=max((a),(b))
// mod
const ll MOD = 1000000007ll;
#define FIX(a) ((a)%MOD+MOD)%MOD
// floating
typedef double Real;
const Real EPS = 1e-11;
#define EQ0(x) (abs(x)<EPS)
#define EQ(a,b) (abs(a-b)<EPS)
typedef complex<Real> P;
inline void solve(){
double a,b,t;
scanf("%lf%lf%lf",&a,&b,&t);
if(a==0){
// ln(x)^b = t
t = pow(t,1.0/b);
printf("%.12lf\n",exp(t));
}else{
t = log(t);
double n = log(25252.0);
REP(_,30){
double logx = log(n);
n -= (a*n + b*logx - t)/(a + b/n);
}
printf("%.12f\n",exp(n));
}
}
int main(){
int m;
scanf("%d",&m);
while(m--)solve();
return 0;
}
rickytheta