以下の内容はhttps://blog.hamayanhamayan.com/entry/2018/10/06/233639より取得しました。


Time Limit Exceeded [AtCoder Beginner Contest 112 B]

https://beta.atcoder.jp/contests/abc112/tasks/abc112_b

解法

https://beta.atcoder.jp/contests/abc112/submissions/3348993

t[i]≦Tを満たす中のc[i]の最小値が答え。
もし満たすものがなければ、TLEと答える。

int N, T, c[101], t[101];
//---------------------------------------------------------------------------------------------------
void _main() {
    cin >> N >> T;
    rep(i, 0, N) cin >> c[i] >> t[i];
 
    int ans = inf;
    rep(i, 0, N) if (t[i] <= T) chmin(ans, c[i]);
    if (ans == inf) cout << "TLE" << endl;
    else cout << ans << endl;
}



以上の内容はhttps://blog.hamayanhamayan.com/entry/2018/10/06/233639より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14