• POJ 3299 Humidex


    题意:已知两数,根据公式求第三个数。

    分析:

    1、.lfG++编译不过的C++可能编译过。

    2、输出.lf改成.f后G++可编译过。

    #pragma comment(linker, "/STACK:102400000, 102400000")
    #include<cstdio>
    #include<cstring>
    #include<cstdlib>
    #include<cctype>
    #include<iomanip>
    #include<cmath>
    #include<iostream>
    #include<sstream>
    #include<iterator>
    #include<algorithm>
    #include<string>
    #include<vector>
    #include<set>
    #include<map>
    #include<stack>
    #include<deque>
    #include<queue>
    #include<list>
    #define Min(a, b) ((a < b) ? a : b)
    #define Max(a, b) ((a < b) ? b : a)
    const double eps = 1e-8;
    inline int dcmp(double a, double b){
        if(fabs(a - b) < eps) return 0;
        return a > b ? 1 : -1;
    }
    typedef long long LL;
    typedef unsigned long long ULL;
    const int INT_INF = 0x3f3f3f3f;
    const int INT_M_INF = 0x7f7f7f7f;
    const LL LL_INF = 0x3f3f3f3f3f3f3f3f;
    const LL LL_M_INF = 0x7f7f7f7f7f7f7f7f;
    const int dr[] = {0, 0, -1, 1, -1, -1, 1, 1};
    const int dc[] = {-1, 1, 0, 0, -1, 1, -1, 1};
    const int MOD = 1e9 + 7;
    const double pi = acos(-1.0);
    const int MAXN = 10000 + 10;
    const int MAXT = 10000 + 10;
    using namespace std;
    int main()
    {
        char a;
        while(1){
            double T = 200.0, D = 200.0, H = 200.0;
            for(int i = 0; i < 2; ++i){
                cin >> a;
                if(a == 'E') return 0;
                if(a == 'T'){
                    cin >> T;
                }
                else if(a == 'D'){
                    cin >> D;
                }
                else if(a == 'H'){
                    cin >> H;
                }
            }
            if(H == 200.0){
                H = T + 0.5555 * (6.11 * exp(5417.7530 * (1 / 273.16 - 1 / (D + 273.16))) - 10.0);
            }
            else if(T == 200.0){
                T = H - 0.5555 * (6.11 * exp(5417.7530 * (1 / 273.16 - 1 / (D + 273.16))) - 10.0);
            }
            else if(D == 200.0){
                D = 1 / (1 / 273.16 - log(((H - T) / 0.5555 + 10.0) / 6.11) / 5417.7530) - 273.16;
            }
            printf("T %.1f D %.1f H %.1f\n", T, D, H);
        }
        return 0;
    }
    

     

  • 相关阅读:
    安卓Android基础—第一天
    android打电话方法(直接拨通)
    android打电话简单功能(完整代码)
    android最最基础简单的保存xml代码
    Android广播接收者笔记
    记录点点滴滴
    改变对话框和控件的背景及文本颜色
    对话框捕获WM_KEYDOWN消息
    对话框捕获鼠标移动消息,实现“逃跑按钮”
    注意!!!对话框的默认按钮、输入焦点传递
  • 原文地址:https://www.cnblogs.com/tyty-Somnuspoppy/p/6503230.html
Copyright © 2020-2023  润新知