Runtime Error
/in/foo.c: In function 'main': /in/foo.c:10:2: warning: this 'if' clause does not guard... [-Wmisleading-indentation] if(m>k)printf("Yes\n");return 1; ^~ /in/foo.c:10:25: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if' if(m>k)printf("Yes\n");return 1; ^~~~~~ /in/foo.c:15:4: warning: this 'if' clause does not guard... [-Wmisleading-indentation] if(a[i]>m)printf("No\n");return 1; ^~ /in/foo.c:15:29: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if' if(a[i]>m)printf("No\n");return 1; ^~~~~~ /in/foo.c:25:2: warning: suggest parentheses around assignment used as truth value [-Wparentheses] if(t=0) ^~ /in/foo.c:25:2: warning: this 'if' clause does not guard... [-Wmisleading-indentation] /in/foo.c:26:18: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if' printf("Yes\n");return 1; ^~~~~~ /in/foo.c:33:2: warning: suggest parentheses around assignment used as truth value [-Wparentheses] if(t=0) ^~ /in/foo.c:33:2: warning: this 'if' clause does not guard... [-Wmisleading-indentation] /in/foo.c:34:18: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if' printf("Yes\n");return 1; ^~~~~~ /in/foo.c:35:2: warning: suggest parentheses around assignment used as truth value [-Wparentheses] if(t=1) ^~ /in/foo.c:35:2: warning: this 'if' clause does not guard... [-Wmisleading-indentation] /in/foo.c:36:17: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if' printf("No\n");return 1; ^~~~~~
代码
#include<stdio.h>
int main()
{
int n,m,k,i,a[1000],t;
scanf("%d%d%d",&n,&m,&k);
for(i=0;i<n;i++)
{
scanf("%d",&a[i]);
}
if(m>k)printf("Yes\n");return 1;
if(m<k)
{
for(i=0;i<n;i++)
{
if(a[i]>m)printf("No\n");return 1;
}
printf("Yes\n");return 1;
}
t=0;
for(i=0;i<n;i++)
{
if(a[i]>m)
t=1;
}
if(t=0)
printf("Yes\n");return 1;
t=0;
for(i=0;i<n;i++)
{
if(a[i]%(m+1)==0)
t=1;
}
if(t=0)
printf("Yes\n");return 1;
if(t=1)
printf("No\n");return 1;
}
信息
- 递交者
- 类型
- 递交
- 题目
- P1002 hitwh 2019 新生赛 C cqsss and his enterprise
- 语言
- C
- 递交时间
- 2020-12-19 15:54:38
- 评测时间
- 2020-12-19 15:54:38
- 评测机
- 分数
- 0
- 总耗时
- 10ms
- 峰值内存
- 220.0 KiB