记录详情

Runtime Error

/in/foo.c:2:6: warning: return type of 'main' is not 'int' [-Wmain]
 void main() 
      ^~~~
/in/foo.c: In function 'main':
/in/foo.c:5:8: warning: unused variable 'j' [-Wunused-variable]
  int i,j;
        ^
# 状态 耗时 内存占用
#1 Runtime Error 1ms 216.0 KiB
#2 Runtime Error 1ms 128.0 KiB
#3 Runtime Error 1ms 220.0 KiB
#4 Runtime Error 1ms 128.0 KiB
#5 Runtime Error 1ms 216.0 KiB
#6 Runtime Error 1ms 128.0 KiB
#7 Runtime Error 1ms 128.0 KiB
#8 Runtime Error 1ms 128.0 KiB
#9 Runtime Error 1ms 128.0 KiB
#10 Runtime Error 1ms 128.0 KiB
#11 Runtime Error 1ms 128.0 KiB
#12 Runtime Error 1ms 128.0 KiB
#13 Runtime Error 1ms 204.0 KiB

代码

#include<stdio.h>
void main() 
{
	int n,m,k,a,a1;
	int i,j;
	int shang,yu;
	scanf("%d%d%d",&n,&m,&k);
	while(n>0)
	{
		scanf("%d",&a);
		for(i=1;i<=m;i++)
		{
			a1=a-i;
			shang=a1/(k+1);
			yu=a1%(k+1);
			if(shang*(m-1)>=yu)
			break;
		}
		if(i==m+1)
		break;
		n--;
	}
	if(n==0)
	printf("Yes\n");
	else
	printf("No\n");
}

信息

递交者
类型
递交
题目
P1002 hitwh 2019 新生赛 C cqsss and his enterprise
语言
C
递交时间
2020-12-24 13:13:28
评测时间
2020-12-24 13:13:28
评测机
分数
0
总耗时
20ms
峰值内存
220.0 KiB