結果
問題 | No.1980 [Cherry 4th Tune D] 停止距離 |
ユーザー | gandalfr-KY |
提出日時 | 2022-06-17 22:08:51 |
言語 | C++14 (gcc 12.3.0 + boost 1.83.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 4,458 bytes |
コンパイル時間 | 3,365 ms |
コンパイル使用メモリ | 166,252 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-09 08:09:00 |
合計ジャッジ時間 | 21,289 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 2 ms
5,248 KB |
testcase_01 | AC | 119 ms
5,248 KB |
testcase_02 | WA | - |
testcase_03 | AC | 336 ms
5,248 KB |
testcase_04 | AC | 85 ms
5,248 KB |
testcase_05 | AC | 427 ms
5,248 KB |
testcase_06 | AC | 670 ms
5,712 KB |
testcase_07 | AC | 664 ms
5,712 KB |
testcase_08 | WA | - |
testcase_09 | AC | 671 ms
5,596 KB |
testcase_10 | WA | - |
testcase_11 | AC | 673 ms
5,584 KB |
testcase_12 | AC | 664 ms
5,708 KB |
testcase_13 | AC | 663 ms
5,584 KB |
testcase_14 | AC | 664 ms
5,584 KB |
testcase_15 | AC | 671 ms
5,836 KB |
testcase_16 | AC | 695 ms
5,716 KB |
testcase_17 | AC | 696 ms
5,716 KB |
testcase_18 | WA | - |
testcase_19 | WA | - |
testcase_20 | WA | - |
testcase_21 | WA | - |
testcase_22 | WA | - |
testcase_23 | AC | 696 ms
5,712 KB |
testcase_24 | WA | - |
testcase_25 | AC | 698 ms
5,588 KB |
testcase_26 | AC | 2 ms
5,248 KB |
ソースコード
#include <iostream> #include <algorithm> #include <vector> #include <string> #include <math.h> #include <iomanip> #include <fstream> #include <map> #include <set> #include <queue> #include <list> #include <iomanip> #include <numeric> #include <bitset> #include <atcoder/all> using namespace std; using namespace atcoder; template<typename T1, typename T2> class myPair : public std::pair<T1, T2>{ using std::pair<T1, T2>::pair; public: inline const myPair<T1, T2> operator+(const myPair<T1, T2> &p) { return {this->first + p.first, this->second + p.second}; } inline const myPair<T1, T2> operator-(const myPair<T1, T2> &p) { return {this->first - p.first, this->second - p.second}; } template<typename U> inline const myPair<T1, T2> operator*(const U &p) { return {this->first * p, this->second * p}; } template<typename U> inline const myPair<T1, T2> operator/(const U &p) { return {this->first / p, this->second / p}; } inline myPair& operator+=(const myPair<T1, T2> &p) { *this = *this + p; return *this; } inline myPair& operator-=(const myPair<T1, T2> &p) { *this = *this - p; return *this; } template<typename U> inline myPair& operator*=(const U &x) { *this = *this * x; return *this; } template<typename U> inline myPair& operator/=(const U &x) { *this = *this / x; return *this; } }; #define pair myPair using ll = long long; using mint = modint1000000007; using mint_ = modint998244353; using P = pair<int,int>; using PL = pair<ll,ll>; using V = vector<int>; using VL = vector<ll>; using VD = vector<double>; using VC = vector<char>; using VP = vector<P>; using VS = vector<string>; using VM = vector<mint>; using VM_ = vector<mint_>; using VV = vector<V>; using VVL = vector<VL>; using VVD = vector<VD>; using VVC = vector<VC>; using VVP = vector<VP>; using VVS = vector<VS>; using VVM = vector<VM>; using VVM_ = vector<VM_>; const int INF = 1001001001; const ll INFL = 1001001001001001001; const ll MOD = 1000000007; const ll MOD_ = 998244353; const V DH = {0,1,0,-1}; const V DW = {1,0,-1,0}; struct grid{int h, w;}; #define rep(i, j, n) for(ll i = (ll)(j); i < (ll)(n); i++) #define repb(i, j, n) for(ll i = (ll)(n-1); i >= (ll)(j); i--) #define reps(i, j, n) for(ll i = (ll)(j); i <= (ll)(n); i++) #define repsb(i, j, n) for(ll i = (ll)(n); i >= (ll)(j); i--) #define all(a) (a).begin(),(a).end() template<typename T> ostream &operator<<(ostream &os, const vector< T > &v) { for(int i=0; i<(int)v.size(); i++){ os << v[i] << (i+1 != (int)v.size() ? " " : ""); } return os; } template<typename T> istream &operator>>(istream &is, vector<T> &v){ for(T &in : v) is >> in; return is; } template<typename T1, typename T2> ostream &operator<<(ostream &os, const pair<T1, T2>& p) { os << p.first << " " << p.second; return os; } template<typename T1, typename T2> istream &operator>>(istream &is, pair<T1, T2> &p) { is >> p.first >> p.second; return is; } template<class T> vector<int> compress(vector<T> &v, int a = 0){ vector<T> w = v; vector<int> ret(v.size()); sort(w.begin(), w.end()); w.erase(unique(w.begin(), w.end()), w.end()); for(int i=0; i<v.size(); i++){ ret[i] = lower_bound(w.begin(), w.end(), v[i]) - w.begin() + a; } return ret; } void Yes(bool a){ if(a) cout << "Yes\n"; else cout << "No\n"; } template<class T> bool chmin(T& a, T b){ if(a > b){ a = b; return true; } return false; } template<class T> bool chmax(T& a, T b){ if(a < b){ a = b; return true; } return false; } template<class T> T power(T x, ll n) { T ret = 1; while (n > 0) { if (n & 1) ret = ret * x/* % MOD*/; x = x * x/* % MOD*/; n >>= 1; } return ret; } ll round_up(ll a, ll b){ return (a + b - 1) / b; } ll gcd(ll a, ll b){ if(a % b == 0){ return(b); }else{ return(gcd(b, a % b)); } } ll lcm(ll a, ll b){ return a / gcd(a, b) * b ; } int main(void){ //input int N; cin >> N; vector<double> answers; //calculate while(N--){ double t,m,l; cin >> t >> m >> l; double ans = (sqrt(m*m*t*t+m*l/5) - m*t)*36; answers.push_back((double)ans); } for(double d : answers){ cout << fixed << setprecision(2) << floor(d * 100)/100 << endl; } }