如果发现广告等破坏行为,请尽量将条目恢复到较早的版本而不是把相应内容直接删除,谢谢合作。

URAL/1644

来自"NOCOW"

跳转到: 导航, 搜索
#include <iostream>
#include <string>
using namespace std;
int n,x,min_s=10,max_h=0;
string s;
int main()
{
    cin >> n;
    for (int i=1;i<=n;++i)
    {
        cin >> x >> s;
        if (s == "satisfied")
            min_s=min(min_s,x);
        else
            max_h=max(max_h,x);
        if (max_h >= min_s)
        {
            cout << "Inconsistent" << endl;
            return 0;
        }
    }
    cout << min_s << endl;
    return 0;
}
//by zzy
个人工具