您当前的位置: 首页 >  后端

MangataTS

暂无认证

  • 0浏览

    0关注

    423博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

小红书C++后端开发笔试

MangataTS 发布时间:2022-09-19 18:13:10 ,浏览量:0

编程部分

前面的选择题忘了

T1 零件组装 思路

用桶排思想存一下,然后取最小的零件个数

代码
#include 
using namespace std;

int a[5],cnt[5];

int main()
{
	for(int i = 0;i >a[i];
	int temp;
	int ans = 0x3f3f3f3f;
	for(int i = 0;i temp;
			if(temp >= a[4]) cnt[i]++;
		}
		ans = min(ans,cnt[i]);
	}
	cout>k;
	for(int i = 1;i >a[i];
	memset(f,0x3f,sizeof f);
	f[0] = f[1] = 0;
	for(int i = 1;i a[i];
	
	map vis;
	int ans = 0;
	for(int i = 1;i             
关注
打赏
1665836431
查看更多评论
0.0441s