Runtime Error
/in/foo.c: In function 'main': /in/foo.c:29:2: warning: suggest parentheses around assignment used as truth value [-Wparentheses] if(t=0) ^~ /in/foo.c:40:2: warning: suggest parentheses around assignment used as truth value [-Wparentheses] if(t=0){printf("Yes\n");return 1; ^~ /in/foo.c:42:2: warning: suggest parentheses around assignment used as truth value [-Wparentheses] if(t=1){ 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;
}
return 0;
}
信息
- 递交者
- 类型
- 递交
- 题目
- P1002 hitwh 2019 新生赛 C cqsss and his enterprise
- 语言
- C
- 递交时间
- 2020-12-19 15:55:54
- 评测时间
- 2020-12-19 15:55:54
- 评测机
- 分数
- 0
- 总耗时
- 11ms
- 峰值内存
- 228.0 KiB