110 条题解

  • -4
    @ 2026-8-19 9:52:57
    #include <bits/stdc++.h>
    using namespace std;
    const int N = 110;
    int x, y, z, n;
    bool ans = 1;
    
    struct node {
    	int read, xdm, cyl;
    	int zsj;
    } a[N];
    
    int main() {
    	cin >> x >> y >> n ;
    	z = x + y;
    	for (int i = 0; i < n; i++) {
    		cin >> a[i].read >> a[i].xdm >> a[i].cyl;
    		a[i].zsj = a[i].read + a[i].xdm + a[i].cyl;
    		if (a[i].zsj < z)
    			ans = 0;
    	}
    	if (ans == 1)
    		cout << "Yes\n";
    	else
    		cout << "No\n";
    	return 0;
    }
    

    信息

    ID
    115
    时间
    1000ms
    内存
    32MiB
    难度
    7
    标签
    递交数
    2068
    已通过
    510
    上传者