Submission #3433872
Source Code Expand
#include<cstdio>
int N,M,X,Y,Z;
int x[105],y[105];
int main(){
int max,min;
scanf("%d%d%d%d",&N,&M,&X,&Y);
max=X;
min=Y;
for(int i=1;i<=N;i++){
scanf("%d",&x[i]);
if(x[i]>max)
max=x[i];
}
for(int i=1;i<=M;i++){
scanf("%d",&y[i]);
if(y[i]<min)
min=y[i];
}
if(min-max<=0)
printf("War");
else
printf("No War");
}
Submission Info
Compile Error
./Main.cpp: In function ‘int main()’:
./Main.cpp:6:31: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d%d%d",&N,&M,&X,&Y);
^
./Main.cpp:10:20: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&x[i]);
^
./Main.cpp:15:20: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&y[i]);
^
Judge Result
Set Name |
All |
Sample |
Score / Max Score |
200 / 200 |
0 / 0 |
Status |
|
|
Set Name |
Test Cases |
All |
hand1, hand2, max1, max2, max3, max4, max5, max7, max8, normal1, normal2, normal3, normal4, normal5, sample_01, sample_02, sample_03 |
Sample |
sample_01, sample_02, sample_03 |
Case Name |
Status |
Exec Time |
Memory |
hand1 |
AC |
1 ms |
128 KB |
hand2 |
AC |
1 ms |
128 KB |
max1 |
AC |
1 ms |
128 KB |
max2 |
AC |
1 ms |
128 KB |
max3 |
AC |
1 ms |
128 KB |
max4 |
AC |
1 ms |
128 KB |
max5 |
AC |
1 ms |
128 KB |
max7 |
AC |
1 ms |
128 KB |
max8 |
AC |
1 ms |
128 KB |
normal1 |
AC |
1 ms |
128 KB |
normal2 |
AC |
1 ms |
128 KB |
normal3 |
AC |
1 ms |
128 KB |
normal4 |
AC |
1 ms |
128 KB |
normal5 |
AC |
1 ms |
128 KB |
sample_01 |
AC |
1 ms |
128 KB |
sample_02 |
AC |
1 ms |
128 KB |
sample_03 |
AC |
1 ms |
128 KB |