Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- typedef long long ll;
- typedef pair<int, int> pii;
- #define F first
- #define S second
- int main(){
- ios::sync_with_stdio(false);
- cin.tie(0);
- int te; cin >> te;
- while (te--){
- int n, lim;
- cin >> n >> lim;
- int ans = -1;
- while (n--){
- int a, b, c; cin >> a >> b >> c;
- if (c <= lim)
- ans = max(ans, a*b);
- }
- if (ans == -1)
- cout << "no tablet\n";
- else
- cout << ans << "\n";
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment