UOJ Logo

NOI.AC

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#194122#3413. 大招释放ChiefJustice1002ms1164kbC++111.2kb2023-10-15 09:25:372023-10-15 12:13:22

answer

#include<bits/stdc++.h>
#define fi first
#define se second
#define db double
#define U unsigned
#define P pair<int,int>
#define int long long
#define pb push_back
#define MP make_pair
#define all(x) x.begin(),x.end()
#define CLR(i,a) memset(i,a,sizeof(i))
#define FOR(i,a,b) for(int i=a;i<=b;i++)
#define ROF(i,a,b) for(int i=a;i>=b;i--)
#define debug(x) cerr<<#x<<'='<<x<<std: :endl
#define MIN(a,b) ((a)<(b)?(a):(b))
#define MAX(a,b) ((a)>(b)?(a):(b))
#define gc getchar()
#define pc putchar
using namespace std;
inline int rd(){
    int x=0,f=1;
    char ch=gc;
    while(ch<'0'||ch>'9'){if(ch=='-') f=-1;ch=gc;
    }
    while(ch>='0' && ch<='9') x=(x<<1)+(x<<3)+(ch^48),ch=gc;
    return x*f;
}
inline void wr(int x){
    if(x<0) x=-x;
    if(x>9) wr(x/10);
    pc((x%10)^48);
}
int c[6],b[6];
int a[10][10];
int sum[6];
signed main(){
	FOR(i,1,4) cin>>c[i];
	FOR(i,1,4) FOR(j,1,4) cin>>a[i][j];
	FOR(j,1,4)
	FOR(i,1,4) sum[i]+=a[j][i];
	if(sum[1]<c[1]&&sum[2]<c[2]&&sum[3]<c[3]&&sum[4]<c[4]){
		cout<<"No";
		return 0;
	}
	if((sum[1]>=c[1]&&sum[2]>=c[2]&&sum[3]>=c[3]&&sum[4]>=c[4])){
		cout<<"Yes";
		return 0;
	}
	cout<<"No";
	return 0;
}

详细

小提示:点击横条可展开更详细的信息

Test #1:

score: 10
Accepted
time: 0ms
memory: 1160kb

input:

19 52 8 18
28 58 66 14
5 38 74 58
80 34 50 3
21 61 74 11

output:

Yes

result:

ok single line: 'Yes'

Test #2:

score: 10
Accepted
time: 0ms
memory: 1164kb

input:

19 16 34 8
20 44 45 2
30 64 69 72
70 26 62 63
35 5 76 49

output:

Yes

result:

ok single line: 'Yes'

Test #3:

score: 10
Accepted
time: 1ms
memory: 1164kb

input:

67 77 11 29
35 79 25 7
22 41 65 48
10 77 10 42
39 52 29 12

output:

Yes

result:

ok single line: 'Yes'

Test #4:

score: 10
Accepted
time: 0ms
memory: 1160kb

input:

51 41 69 67
0 39 10 77
46 36 11 29
48 69 45 27
70 44 31 50

output:

Yes

result:

ok single line: 'Yes'

Test #5:

score: 10
Accepted
time: 0ms
memory: 1164kb

input:

19 21 15 9
73 24 38 33
39 62 7 60
38 38 25 6
74 10 16 12

output:

Yes

result:

ok single line: 'Yes'

Test #6:

score: 10
Accepted
time: 0ms
memory: 1160kb

input:

41 33 30 49
14 2 5 14
13 10 1 14
8 20 8 18
6 1 16 3

output:

Yes

result:

ok single line: 'Yes'

Test #7:

score: 10
Accepted
time: 0ms
memory: 1164kb

input:

52 36 34 38
11 16 14 16
9 6 9 10
16 1 4 3
16 13 7 9

output:

Yes

result:

ok single line: 'Yes'

Test #8:

score: 10
Accepted
time: 1ms
memory: 1160kb

input:

46 42 69 42
7 17 11 9
18 5 11 14
10 11 7 18
11 9 4 1

output:

No

result:

ok single line: 'No'

Test #9:

score: 10
Accepted
time: 0ms
memory: 1160kb

input:

48 43 48 67
11 1 9 7
11 14 10 7
9 10 10 1
17 18 19 14

output:

No

result:

ok single line: 'No'

Test #10:

score: 10
Accepted
time: 0ms
memory: 1164kb

input:

64 48 38 45
19 12 8 18
6 15 4 18
15 3 8 2
6 18 18 7

output:

No

result:

ok single line: 'No'

Extra Test:

score: 0
Extra Test Passed