No Rules Rules

Ship Selection (feat. 백준, 10180번) 본문

생활/코테

Ship Selection (feat. 백준, 10180번)

개발하는 완두콩 2022. 9. 8. 16:34
728x90
반응형

Ship Selection
https://www.acmicpc.net/problem/10180

 

10180번: Ship Selection

Input begins with a line with one integer T (1 ≤ T ≤ 50) denoting the number of test cases. Each test case begins with a line with two space-separated integers N and D, where N (1 ≤ N ≤ 100) denotes the number of ships in the docking bay and D (1

www.acmicpc.net

 

반응형

 

// woohyeon.kim
// kim519620.tistory.com
#include <iostream>
using namespace std;
int main(){
    ios::sync_with_stdio(false), cin.tie(NULL);
    register int T, N, D, V, F, C;
    cin >> T;
    for(register int t = 0, count; t < T; ++t) {
        cin >> N >> D;
        count = 0;
        for(register int n = 0; n < N; ++n){
            cin >> V >> F >> C;
            double fc = static_cast<double>(F) / C;
            if(V * fc >= D)
                ++count;
        }
        cout << count << "\n";
    }
    return 0;
}
// *&)*@*

 

 

아래 "꿍의 우주여행" 과 동일한 문제입니다.

꿍의 우주여행 (feat. 백준, 9501번) (tistory.com)

 

 

728x90
반응형
Comments