結果

問題 No.1980 [Cherry 4th Tune D] 停止距離
ユーザー gandalfr-KYgandalfr-KY
提出日時 2022-06-17 22:01:42
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 4,508 bytes
コンパイル時間 3,304 ms
コンパイル使用メモリ 163,532 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-04-17 13:55:10
合計ジャッジ時間 21,294 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,248 KB
testcase_01 AC 119 ms
5,376 KB
testcase_02 WA -
testcase_03 AC 337 ms
5,376 KB
testcase_04 AC 85 ms
5,376 KB
testcase_05 AC 424 ms
5,376 KB
testcase_06 AC 679 ms
5,708 KB
testcase_07 AC 670 ms
5,712 KB
testcase_08 WA -
testcase_09 AC 666 ms
5,580 KB
testcase_10 WA -
testcase_11 AC 662 ms
5,712 KB
testcase_12 AC 666 ms
5,708 KB
testcase_13 AC 661 ms
5,708 KB
testcase_14 AC 668 ms
5,708 KB
testcase_15 AC 667 ms
5,708 KB
testcase_16 AC 691 ms
5,712 KB
testcase_17 AC 687 ms
5,584 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 705 ms
5,836 KB
testcase_24 WA -
testcase_25 AC 691 ms
5,832 KB
testcase_26 AC 2 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#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;
        ll T = t * 100, M = m * 100, L = l * 100;
        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;
    }


}
0