暑假集训之——sort+结构体练习

SAP固定资产原值与净值取值逻辑全解析:从数据表到ABAP实战 在企业资源计划(ERP)系统中,固定资产的价值管理是财务会计的核心模块,其关键在于准确核算资产原值与净值。从技术原理上看,这涉及对资产全生命周期业务(如购置、折旧、转移、报废)的财务建模,以及底层数据表(如ANLC、ANEP)的精准关联与计算。掌握这一逻辑的技术价值在于,能够确保财务报表数据的准确性,满足合规性要求,并为管理决策提供可靠依据。在SAP ECC或S/4HANA系统的应用场景中,ABAP开发者与财务顾问常需通过编写报表程序,从复杂的数据结构中提取资产价值信息。本文聚焦于SAP资产会计模块,深入剖 阅读详情

虽然有很多题以前有做过,可这次做还是WA了好几发,有些东西看来还是没有掌握透彻。

A - A

来源:HDU1234

每天第一个到机房的人要把门打开,最后一个离开的人要把门关好。现有一堆杂乱的机房签 
到、签离记录,请根据记录找出当天开门和关门的人。 

Input

测试输入的第一行给出记录的总天数N ( > 0 )。下面列出了N天的记录。 
每天的记录在第一行给出记录的条目数M ( > 0 ),下面是M行,每行的格式为 

证件号码 签到时间 签离时间 

其中时间按“小时:分钟:秒钟”(各占2位)给出,证件号码是长度不超过15的字符串。 

Output

对每一天的记录输出1行,即当天开门和关门人的证件号码,中间用1空格分隔。 
注意:在裁判的标准测试输入中,所有记录保证完整,每个人的签到时间在签离时间之前, 
且没有多人同时签到或者签离的情况。 

Sample Input

3
1
ME3021112225321 00:00:00 23:59:59
2
EE301218 08:05:35 20:56:35
MA301134 12:35:45 21:40:42
3
CS301111 15:30:28 17:00:10
SC3021234 08:00:00 11:25:25
CS301133 21:45:00 21:58:40

Sample Output

ME3021112225321 ME3021112225321
EE301218 MA301134
SC3021234 CS301133

 思路:将时间都处理为以秒为单位的,开门人来的时间是最早的,关门人走的时间是最晚的,对于每一个人来说,都有与之对应的到达时间和离开时间。两个排序可以找到

#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;

struct node{
	char name[100];
	int sh,sm,ss,eh,em,es;
	int st,et;
}a[10000];
bool cmp1(node x,node y)
{
	return x.st<y.st;
}
bool cmp2(node x,node y)
{
	return x.et>y.et;
}
int main()
{
	int n,m;
	scanf("%d",&m);
	while(m--)
	{
		scanf("%d",&n);
		for(int i=0;i<n;i++)
		{
			scanf("%s %d:%d:%d %d:%d:%d",a[i].name,&a[i].sh,&a[i].sm,&a[i].ss,&a[i].eh,&a[i].em,&a[i].es);
			a[i].st=a[i].sh*3600+a[i].sm*60+a[i].ss;
			a[i].et=a[i].eh*3600+a[i].em*60+a[i].es;
		}
		sort(a,a+n,cmp1);
		printf("%s",a[0].name);
		sort(a,a+n,cmp2);
		printf(" %s\n",a[0].name);
		
	}
	return 0;
}

 


B - B

Excel可以对一组纪录按任意指定列排序。现请你编写程序实现类似功能。

Input

测试输入包含若干测试用例。每个测试用例的第1行包含两个整数 N (<=100000) 和 C,其中 N 是纪录的条数,C 是指定排序的列号。以下有 N 
行,每行包含一条学生纪录。每条学生纪录由学号(6位数字,同组测试中没有重复的学号)、姓名(不超过8位且不包含空格的字符串)、成绩(闭区间[0, 100]内的整数)组成,每个项目间用1个空格隔开。当读到 N=0 时,全部输入结束,相应的结果不要输出。 

Output

对每个测试用例,首先输出1行“Case i:”,其中 i 是测试用例的编号(从1开始)。随后在 N 行中输出按要求排序后的结果,即:当 C=1 时,按学号递增排序;当 C=2时,按姓名的非递减字典序排序;当 C=3 
时,按成绩的非递减排序。当若干学生具有相同姓名或者相同成绩时,则按他们的学号递增排序。 

Sample Input

3 1
000007 James 85
000010 Amy 90
000001 Zoe 60
4 2
000007 James 85
000010 Amy 90
000001 Zoe 60
000002 James 98
4 3
000007 James 85
000010 Amy 90
000001 Zoe 60
000002 James 90
0 0

Sample Output

Case 1:
000001 Zoe 60
000007 James 85
000010 Amy 90
Case 2:
000010 Amy 90
000002 James 98
000007 James 85
000001 Zoe 60
Case 3:
000001 Zoe 60
000007 James 85
000002 James 90
000010 Amy 90

姓名或者成绩相同的时候按学号递增排序,注意一下这点就好了

#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;
const int maxn=100000+9;
struct node{
	int id,score;
	char name[10];
}a[maxn];

bool cmp1(node x,node y)
{
	return x.id<y.id;
}
bool cmp2(node x,node y)
{
	return strcmp(x.name,y.name)==0?x.id<y.id:strcmp(x.name,y.name)<0;
}
bool cmp3(node x,node y)
{
	return x.score==y.score?x.id<y.id:x.score<y.score;
}

int main()
{
	int n,c;
	int t=0;
	while(~scanf("%d %d",&n,&c)&&n)
	{
		for(int i=0;i<n;i++)
			cin>>a[i].id>>a[i].name>>a[i].score;
		switch (c)
		{
			case 1:sort(a,a+n,cmp1);break;
			case 2:sort(a,a+n,cmp2);break;
			case 3:sort(a,a+n,cmp3);break;
		}
		printf("Case %d:\n",++t);
		for(int i=0;i<n;i++)
		printf("%06d %s %d\n",a[i].id,a[i].name,a[i].score);
	}
	return 0;
}

C - C

还记得Gardon给小希布置的那个作业么?(上次比赛的1005)其实小希已经找回了原来的那张数表,现在她想确认一下她的答案是否正确,但是整个的答案是很庞大的表,小希只想让你把答案中最大的M个数告诉她就可以了。 
给定一个包含N(N<=3000)个正整数的序列,每个数不超过5000,对它们两两相加得到的N*(N-1)/2个和,求出其中前M大的数(M<=1000)并按从大到小的顺序排列。

Input

输入可能包含多组数据,其中每组数据包括两行: 
第一行两个数N和M, 
第二行N个数,表示该序列。 
 

Output

对于输入的每组数据,输出M个数,表示结果。输出应当按照从大到小的顺序排列。

Sample Input

4 4
1 2 3 4
4 5
5 3 6 4

Sample Output

7 6 5 5
11 10 9 9 8

暴力出奇迹。

#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;
const int maxn=3002;
int a[maxn];
int b[maxn*maxn];

bool cmp(int x,int y)
{
	return x>y;
}

int main()
{
	int n,m;
	while(~scanf("%d %d",&n,&m))
	{
		for(int i=0;i<n;i++)
			scanf("%d",&a[i]);
		int z=0;
		for(int i=0;i<n;i++)
			for(int j=i+1;j<n;j++)
				b[z++]=a[i]+a[j];
		sort(b,b+z,cmp);
		for(int i=0;i<m;i++)
		{
			if(i)	printf(" ");
			printf("%d",b[i]);
		}
		printf("\n");
	}
	return 0;
}

D - D

读入N名学生的成绩,将获得某一给定分数的学生人数输出。 

Input

测试输入包含若干测试用例,每个测试用例的格式为 


第1行:N 
第2行:N名学生的成绩,相邻两数字用一个空格间隔。 
第3行:给定分数 

当读到N=0时输入结束。其中N不超过1000,成绩分数为(包含)0到100之间的一个整数。 

Output

对每个测试用例,将获得给定分数的学生人数输出。 

Sample Input

3
80 60 90
60
2
85 66
0
5
60 75 90 55 75
75
0

Sample Output

1
0
2


        
  
Huge input, scanf is recommended.

数量比较小的话用桶排序比较方便

#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;
int score[105];
int main()
{
	int n,m;	int x;
	while(~scanf("%d",&n)&&n)
	{
		memset(score,0,sizeof(score));
		for(int i=0;i<n;i++)
		{
			scanf("%d",&x);
			score[x]++;
		}
		scanf("%d",&m);
		printf("%d\n",score[m]);
	 } 
	return 0;
}

E - E

大家都知道,快速排序是不稳定的排序方法。 
如果对于数组中出现的任意a[i],a[j](i<j),其中a[i]==a[j],在进行排序以后a[i]一定出现在a[j]之前,则认为该排序是稳定的。 

某高校招生办得到一份成绩列表,上面记录了考生名字和考生成绩。并且对其使用了某排序算法按成绩进行递减排序。现在请你判断一下该排序算法是否正确,如果正确的话,则判断该排序算法是否为稳定的。 

Input

本题目包含多组输入,请处理到文件结束。 
对于每组数据,第一行有一个正整数N(0<N<300),代表成绩列表中的考生数目。 
接下来有N行,每一行有一个字符串代表考生名字(长度不超过50,仅包含'a'~'z'),和一个整数代表考生分数(小于500)。其中名字和成绩用一个空格隔开。 
再接下来又有N行,是上述列表经过某排序算法以后生成的一个序列。格式同上。

Output

对于每组数据,如果算法是正确并且稳定的,就在一行里面输出"Right"。如果算法是正确的但不是稳定的,就在一行里面输出"Not Stable",并且在下面输出正确稳定排序的列表,格式同输入。如果该算法是错误的,就在一行里面输出"Error",并且在下面输出正确稳定排序的列表,格式同输入。 

注意,本题目不考虑该排序算法是错误的,但结果是正确的这样的意外情况。

Sample Input

3
aa 10
bb 10
cc 20
cc 20
bb 10
aa 10
3
aa 10
bb 10
cc 20
cc 20
aa 10
bb 10
3
aa 10
bb 10
cc 20
aa 10
bb 10
cc 20

Sample Output

Not Stable
cc 20
aa 10
bb 10
Right
Error
cc 20
aa 10
bb 10

WA了好几次,因为没有注意题意。。。

这道题要注意如果成绩相同的话,姓名是按照输入的顺序排列的,这点比较坑

需要记录下输入顺序

#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;
const int maxn=300+9;
struct node{
	char name[55];
	int score,m;
}a[maxn];

bool cmp(node x,node y)
{
	return x.score==y.score?x.m<y.m:x.score>y.score;//成绩相同的话按照输入顺序从小到大排列 
}

int main()
{
	int n;
	node b[maxn];
	while(~scanf("%d",&n))
	{
		for(int i=0;i<n;i++)
		{
			cin>>a[i].name>>a[i].score;
			a[i].m=i;//记录输入的顺序 
		}
		for(int i=0;i<n;i++)
			cin>>b[i].name>>b[i].score;
		sort(a,a+n,cmp);
		int x=0,y=0;
		for(int i=0;i<n;i++)
			if(a[i].score!=b[i].score)
			{
				y=1;//Error
				break;
			 } 
		for(int i=0;i<n;i++)
			if(strcmp(a[i].name,b[i].name)!=0)	
			{
				x=1;//Not Stable
				break;
			}
		if(x==0&&y==0)	
		{
			printf("Right\n");
			continue;
		}
		if(y==1)
		{
			printf("Error\n");
			for(int i=0;i<n;i++)
				printf("%s %d\n",a[i].name,a[i].score);
			continue;
		}
		if(x==1)
		{
			printf("Not Stable\n");
			for(int i=0;i<n;i++)
				printf("%s %d\n",a[i].name,a[i].score);
		}
	}
	return 0;
}

F - F

“Point, point, life of student!” 
This is a ballad(歌谣)well known in colleges, and you must care about your score in this exam too. How many points can you get? Now, I told you the rules which are used in this course. 
There are 5 problems in this final exam. And I will give you 100 points if you can solve all 5 problems; of course, it is fairly difficulty for many of you. If you can solve 4 problems, you can also get a high score 95 or 90 (you can get the former(前者) only when your rank is in the first half of all students who solve 4 problems). Analogically(以此类推), you can get 85、80、75、70、65、60. But you will not pass this exam if you solve nothing problem, and I will mark your score with 50. 
Note, only 1 student will get the score 95 when 3 students have solved 4 problems. 
I wish you all can pass the exam! 
Come on! 

Input

Input contains multiple test cases. Each test case contains an integer N (1<=N<=100, the number of students) in a line first, and then N lines follow. Each line contains P (0<=P<=5 number of problems that have been solved) and T(consumed time). You can assume that all data are different when 0<p. 
A test case starting with a negative integer terminates the input and this test case should not to be processed. 

Output

Output the scores of N students in N lines for each case, and there is a blank line after each case. 

Sample Input

4
5 06:30:17
4 07:31:27
4 08:12:12
4 05:23:13
1
5 06:30:17
-1

Sample Output

100
90
90
95

100

有五道题,全做对得100分,做对0道得50(交白卷还给分?)

做对4道可以得95 or90

做对3道可以得85 or80

做对2道可以得75 or70

做对1道可以得65 or60

 

在做对相同题目的人中,排名靠前的一半比排名靠后的多得5分(注意,3个人都做对4道题的话只有一个人能够得到95分)

#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;

struct node{
	int score,problems,num,t,h,m,s;
}a[105];

bool cmp1(node x,node y)
{
	return x.problems==y.problems?x.t<y.t:x.problems<y.problems;//按成绩从大到小排列,成绩相同按做题时间从小到大排列 
}
bool cmp2(node x,node y)
{
	return x.num<y.num;
}
int main()
{
	int n;
	while(~scanf("%d",&n)&&(n>0))
	{
		for(int i=0;i<n;i++)
		{
			scanf("%d %d:%d:%d",&a[i].problems,&a[i].h,&a[i].m,&a[i].s);
			a[i].num=i;
			a[i].t=3600*a[i].h+60*a[i].m+a[i].s;
			if(a[i].problems==5)	a[i].score=100;
			if(a[i].problems==0)	a[i].score=50;
		}
		sort(a,a+n,cmp1);
		int two=0;
		int three=0;
		int four=0;
		int one=0;
		for(int i=0;i<n;i++)
		{
			if(a[i].problems==4) four++;
			if(a[i].problems==3) three++;
			if(a[i].problems==2) two++;
			if(a[i].problems==1) one++;
		}
//		printf("\n\nfour:%d\n\n",four);
		int z=four/2;
		int k=0;
		for(int i=0;i<n;i++)
		{
			if(a[i].problems==4)
			{
				if(k<z)	a[i].score=95;
				else		a[i].score=90;
				k++;
			}
		}
	 	z=three/2;
		k=0;
		for(int i=0;i<n;i++)
		{
			if(a[i].problems==3)
			{
				if(k<z)	a[i].score=85;
				else		a[i].score=80;
				k++;
			}
		}
		z=two/2;
		k=0;
		for(int i=0;i<n;i++)
		{
			if(a[i].problems==2)
			{
				if(k<z)	a[i].score=75;
				else		a[i].score=70;
				k++;
			}
		}
		z=one/2;
		k=0;
		for(int i=0;i<n;i++)
		{
			if(a[i].problems==1)
			{
				if(k<z)	a[i].score=65;
				else		a[i].score=60;
				k++;
			}
		}
		sort(a,a+n,cmp2);
		for(int i=0;i<n;i++)
			printf("%d\n",a[i].score);
		printf("\n");
	}
	return 0;
}

 

这里是很久之前的代码,思路基本是一样的:

#include<stdio.h> 
#include<string.h>
#include<algorithm>
using namespace std;
struct node{
    int t,h,m,s;
    int first;
    int grade,score;
}a[101];
int cmp1(node x,node y)
{
    return x.grade!=y.grade?x.grade>y.grade:x.t<y.t;
}
int cmp2(node x,node y)
{
    return x.first<y.first;
}
int main() 
{
    int n;
    while(scanf("%d",&n)!=EOF)
    {
        if(n<0)    break;
        for(int i=0;i<n;i++)
        {
            scanf("%d %d:%d:%d",&a[i].grade,&a[i].h,&a[i].m,&a[i].s);
            a[i].first=i;
            a[i].t=a[i].h*3600+a[i].m*60+a[i].s;
        }
        sort(a,a+n,cmp1);
        int g1=0,g2=0,g3=0,g4=0,c1,c2,c3,c4;
        for(int i=0;i<n;i++)
        {
            if(a[i].grade==5)    a[i].score=100;
            if(a[i].grade==4)    g4++; 
            if(a[i].grade==3)    g3++;
            if(a[i].grade==2)    g2++;
            if(a[i].grade==1)    g1++;
            if(a[i].grade==0)    a[i].score=50;
        }
        c4=g4/2;c3=g3/2;c2=g2/2;c1=g1/2;
        for(int i=0;i<n;i++)
        {
            if(c4>0&&a[i].grade==4)        {a[i].score=95;c4--;}    
            else if(a[i].grade==4)        a[i].score=90;
            if(c3>0&&a[i].grade==3)        {c3--;a[i].score=85;}    
            else if(a[i].grade==3)        a[i].score=80;
            if(c2>0&&a[i].grade==2)        {c2--;a[i].score=75;}    
            else if(a[i].grade==2)        a[i].score=70;
            if(c1>0&&a[i].grade==1)        {c1--;a[i].score=65;}    
            else if(a[i].grade==1)        a[i].score=60;
        }
        sort(a,a+n,cmp2);
        for(int i=0;i<n;i++)
        printf("%d\n",a[i].score);
        printf("\n");
    }
    return 0;
}

 


G - G

Limak is a little polar bear. He has n balls, the i-th ball has size ti.

Limak wants to give one ball to each of his three friends. Giving gifts isn't easy — there are two rules Limak must obey to make friends happy:

  • No two friends can get balls of the same size.
  • No two friends can get balls of sizes that differ by more than 2.

For example, Limak can choose balls with sizes 4, 5 and 3, or balls with sizes 90, 91 and 92. But he can't choose balls with sizes 5, 5 and 6 (two friends would get balls of the same size), and he can't choose balls with sizes 30, 31 and 33 (because sizes 30 and 33 differ by more than 2).

Your task is to check whether Limak can choose three balls that satisfy conditions above.

Input

The first line of the input contains one integer n (3 ≤ n ≤ 50) — the number of balls Limak has.

The second line contains n integers t1, t2, ..., tn (1 ≤ ti ≤ 1000) where ti denotes the size of the i-th ball.

Output

Print "YES" (without quotes) if Limak can choose three balls of distinct sizes, such that any two of them differ by no more than 2. Otherwise, print "NO" (without quotes).

Examples

Input

4
18 55 16 17

Output

YES

Input

6
40 41 43 44 44 44

Output

NO

Input

8
5 972 3 4 1 4 970 971

Output

YES

Note

In the first sample, there are 4 balls and Limak is able to choose three of them to satisfy the rules. He must must choose balls with sizes 18, 16 and 17.

In the second sample, there is no way to give gifts to three friends without breaking the rules.

In the third sample, there is even more than one way to choose balls:

  1. Choose balls with sizes 3, 4 and 5.
  2. Choose balls with sizes 972, 970, 971.

思路:存在三个连续的数就输出YES否则NO

#include<cstdio>
#include<algorithm>
#include<cstring>
using namespace std;

int a[1005];
int main()
{
	int n;
	while(~scanf("%d",&n))
	{
		int x;
		int k=0;
		memset(a,0,sizeof(a));
		for(int i=0;i<n;i++)
		{
			scanf("%d",&x);
			a[x]++;
		}
		for(int i=1;i<1004;i++)
			if(a[i]&&a[i+1]&&a[i+2])	
			{
				k=1;
				break;
			}
		if(k)	printf("YES\n");
		else	printf("NO\n");	
	}
	return 0;
}

 


H - H

“今年暑假不AC?” 
“是的。” 
“那你干什么呢?” 
“看世界杯呀,笨蛋!” 
“@#$%^&*%...” 

确实如此,世界杯来了,球迷的节日也来了,估计很多ACMer也会抛开电脑,奔向电视了。 
作为球迷,一定想看尽量多的完整的比赛,当然,作为新时代的好青年,你一定还会看一些其它的节目,比如新闻联播(永远不要忘记关心国家大事)、非常6+7、超级女生,以及王小丫的《开心辞典》等等,假设你已经知道了所有你喜欢看的电视节目的转播时间表,你会合理安排吗?(目标是能看尽量多的完整节目) 

Input

输入数据包含多个测试实例,每个测试实例的第一行只有一个整数n(n<=100),表示你喜欢看的节目的总数,然后是n行数据,每行包括两个数据Ti_s,Ti_e (1<=i<=n),分别表示第i个节目的开始和结束时间,为了简化问题,每个时间都用一个正整数表示。n=0表示输入结束,不做处理。 

Output

对于每个测试实例,输出能完整看到的电视节目的个数,每个测试实例的输出占一行。

Sample Input

12
1 3
3 4
0 7
3 8
15 19
15 20
10 15
8 18
6 12
5 10
4 14
2 9
0

Sample Output

5

 

活动安排问题的模板题,按照结束时间早的顺序排序

#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;

struct node{
	int st,et;
}a[105]; 

bool cmp(node x,node y)
{
	return x.et<y.et;
}

int main()
{
	int n;
	while(~scanf("%d",&n)&&n)
	{
		for(int i=0;i<n;i++)
			cin>>a[i].st>>a[i].et;
		sort(a,a+n,cmp);
		int z=a[0].et;
		int ans=1;
		for(int i=1;i<n;i++)
			if(a[i].st>=z)
			{
				ans++;
				z=a[i].et;
			}
		cout<<ans<<endl;
	}
	return 0;
}

       

【AI智能体】Dify 搭建数据分析应用实战操作详解 Dify 搭建数据分析应用实战详解 阅读详情

相关推荐

保姆级教程:用OpenCV和MediaPipe在Python里实现实时手势识别(附完整代码)

本文提供了一份详细的Python教程,教你如何使用OpenCV和MediaPipe实现实时手势识别系统。从环境配置、手部关键点检测到手势分类算法,逐步讲解如何构建高精度手势识别应用,适用于智能家居控制、PPT操作等场景。教程包含完整代码示例和性能优化技巧,特别适合计算机视觉初学者和开发者实践。

weixin_28677005的博客 328

Element表格---使用sort-method实现的几种排序

html部分 :sort-method="sortNumber" //html部分 <el-table-column sortable :sort-method="sortNumber" label="金额" prop="total" /> js部分 methods:{ sortMethod(a, b) { return a.total - b.total } }

pei_y_y的博客 5577

python编程实现制作网络流量监控动画

c,实时显示网络带宽使用情况,用柱状图或折线图表示不同时间段的流量变化。通过 Python编程实现图形库(如 Pygame、Tkinter、Matplotlib 等)来实现计算机网络基础概念的可视化动画。global bars # 声明 bars 为全局变量。# 获取当前网络流量。# 创建图形和坐标轴。

qq_42788199的博客 718

HDU——1084 What is your grade?(莫名的Wrong Answer)

Problem Description “Point, point, life of student!” This is a ballad(歌谣)well known in colleges, and you must care about your score in this exam too. How many points can you get? Now, I told you the...

LightOn 378

MATLAB创建GUI面板实现二维码生成与识别

利用matlab设计gui界面实现二维码的生成与内容识别

infinitystardust的博客 3149

YOLO26中的PPM空间金字塔池化:改良设计与多尺度特征提取教程

在计算机视觉的语义分割任务中,准确理解图像中的上下文信息至关重要。例如,在街景图像中,可能同时存在远处的小汽车和近处的大建筑物,网络需要具备捕获多尺度上下文信息的能力。例如,要正确识别图像中的"船",不仅需要看到船本身的特征,还需要理解周围的水面环境。金字塔的每一层对应不同的池化尺度,从细粒度到粗粒度,形成了多层次的特征表示。PPM(Pyramid Pooling Module)正是为了解决这一问题而提出的模块,它通过构建金字塔形状的池化结构,有效地聚合不同尺度的上下文信息,从而提升语义分割的精度。

LXY_LOVE36的博客 82

"巴卡斯杯" 中国大学生程序设计竞赛 - 女生专场(重现)解题思路

"巴卡斯杯" 中国大学生程序设计竞赛 - 女生专场(重现)解题思路

queuelovestack的专栏 1万+

精密装配机器人系列编程:ABB IRB 120_(20).编程项目设计与实施

在精密装配机器人系列编程中,项目的成功设计与实施涉及多个关键步骤。从项目需求分析到最终调试,每一个环节都需要细致的考虑和专业的技术。选择合适的编程语言、设计良好的程序结构、掌握调试技巧以及解决常见问题,都是确保机器人高效、稳定运行的重要因素。通过不断优化和改进,可以提高生产效率和产品质量,满足不断变化的生产需求。

zhubeibei168的博客 1243

HDOJ1872(稳定排序)

稳定排序 Time Limit: 3000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1066Accepted Submission(s): 408 Problem Description 大家都知道,快速排序是不稳定的排序方法。 如果对于...

weixin_30402085的博客 491

C#串口通信从入门到精通(27)——高速通信下解决数据处理慢的问题(20ms以内)

本文介绍如何在高速通信情况下解决串口接收的数据来不及处理的问题,由高级工程师多年经验总结而成,绝对是串口领域的实战经验!

qq_34059233的博客 6810

复分析 阿尔福斯(Ahlfors) 第三版答案 英文

答案分为十章,有部分习题没有答案,全英文复分析阿尔福斯(Ahlfors) 第三版答案

sort函数的第三个参数cmp

sort 函数的第三个参数 cmp

风暴计划 6730

android 蓝牙通讯demo

android 下蓝牙通讯demo,实现了发现蓝牙,使能蓝牙,通过蓝牙发送消息。

暑假算法集训(第一周)

算法暑期训练

qq_56356279的博客 1059

SAP B1中文培訓教材_SDK

公司内部培训资料,对开发工具 ,DIAPI, UIAPI,Add-ON有详细解说

C# WinForm 基于DirectShow.dll编写的程序,可边预览边保存视频,音频和图片

基于微软的DirectShow.dll的二次开发1.自动识别连接的摄像头跟麦克风且可以对其进行选择(默认选中第一个)2.可录制wmv和avi两种格式的视频并且都带有音频,avi可以录制的分辨率和帧数进行选择,wmv默认进行了淸晰度优化如不喜欢可去除代码中有相关提示3.可在预览点开之后进行拍照,也可边录制视频边拍照4.添加了视频和音频的压缩功能(酌情使用)这次二次开发发现C#对DirectShow的相关信息太少,这次做完也不敢藏私共享出来,还望大家指正

2019年暑假集训第十一套题

问题 A: 排名 题目描述 在ACM竞赛中,当遇到有两个队伍(人) 解出相同的题目数量的时候,我们需要通过他们解决问题的总时间进行排序。 一共有 N(1<=N<=5,000)条时间被以时(0<=Hours<=99), 分(0<=Minutes<=59),秒(0<=Seconds<=59)的形式记录。 你必须要把他们按时,分,秒排序为 升序,最少的...

算法小猪的博客 774

2019暑假集训第二周tips

1 用reverse() 函数时要加算法头文件 #include<algorithm> 或者直接万能头文件 #include"bits/stdc++.h" 2 sort() 函数排序的范围是 [ first, last ),包括 first,不包括 last sort() 可以用自定义的比较函数进行排 序,也可以用系统的4种排序:less、greater、 less_equal(小...

qq_40409416的博客 187

ACM暑假集训_STL&模拟_B-Where is the Marble?

ACM暑假集训_STL&amp;模拟_B-Where is the Marble? Description Raju and Meena love to play with Marbles. They have got a lot of marbles with numbers written on them. At the beginning, Raju would place the m...

油爆虾的博客 410

ACM暑假培训第二周学习总结----出自南昌理工学院ACM集训队

1.vector与数组的区别 vector是c++标准库中bai定义的类型,是容器du的一种。标准库中容器有很多种,vector只是最基本的一种,vector类型和数组类型的基本功能都是一样的,就是存储同类元素,但是他与数组最大的区别就是可以实现动态存储。 vector相当于动态数组,比如 char str[100];只能存储100个字符。vector可以动态增长。 vector str(10,‘A’); //初始化为zhi包含10个’A’字符的数组 str.push_back(‘B’); // 现在dao

小世儿的博客 341

2021暑假集训-个人赛11

文章目录A.Simply Strange SortB.Charmed by the Game *C.Deep Down BelowD.Up the Strip (simplified version) *E.Up the Strip *F.Bottom-Tier Reversals *G.Top-Notch Insertions * A.Simply Strange Sort 传送门 题目大意:有两种操作,一种是偶数只对偶数和他后面的进行判断,如果前面大,前后就进行交换 ,同理奇数也是这样,奇数跟偶数..

xingzi201的博客 422

暑假集训 8.16 数据结构实验之排序三:bucket sort (简单的桶排序)

数据结构实验之排序三:bucket sort Time Limit: 100ms   Memory limit: 65536K  有疑问?点这里^_^ 题目描述 根据人口普查结果,知道目前淄博市大约500万人口,你的任务是帮助人口普查办公室按年龄递增的顺序输出每个年龄有多少人,其中不满1周岁的按0岁计算,1到2周岁的按1岁计算,依次类推,大于等于100岁的

Welcome ! This is Guanpx's blog. 423

2016HUAS_ACM暑假集训2G - Who's in the Middle

这个题真的没什么好说的。一个排序就能解决的问题。唯一感到不爽的是这道题不是0msAC的,希望各位大神能够给我点指导。 头文件#include<algorithm>,注意一下排序函数的用法就行了。 我在HDU和POJ上测试了很多次,不得不说HDU确实比较坑爹。POJ上一组案例也是可以过的,当然,这不重要。 题意也简单,大致就是给一组数字要你求中位数。而且给的是奇数个数字。...

dianluoxi8545的博客 138

输出前m个最大数(北京大学暑假集训 )

描述 给定一个数组包含n个元素,统计前m大的数并且把这m个数从大到小输 出。 Input 第一行包含一个整数n和一个整数m。m &lt; n。n表示数组的大小,n &lt; 100000,m表示前m位最大的数。 第二行包含n个整数,表示数组的元素,整数之间以一个空格分开 。每个整数的绝对值不超过100000000。 第三行 output 从大到小输出前m大的数 #in...

weixin_42826497的博客 271

[补题]暑假集训day1_Andrew Stankevich Contest 37

一共9道题,做出4道题,其中我写了两道 A. Achromatic Number n个点的环,给每个点染色使得相邻点颜色不同且所有[Math Processing Error]Ck2C_k^2种颜色相邻都出现过 B. Binary Search C. Blind Flibs D. Bubble Sort E. Word Cover F. Permutations with Monot...

秋叶红于二月花 556

【每日一记·2019.7.17】

2019.7.17(361/119) 记录每天自己的新的感受体会亦或者是题目中的坑。 概述 1.暑假集训第七天。今天中午差点迟到。都到2点20了才醒…惊悚… 2.早上背了复习了前面六天的NewwordsNew wordsNewwords。背了23个新单词。 3.今天把分块看了下。把分块入门一二三四AC了。然后见了一些其他的线段树模型。 题目: 【分块】 其实,大部分的分块都可以用其他的数据结构来代...

EPSILON的博客 255

AtCoder Beginner Contest 254

AtCoder Beginner Contest 254

青少年趣味编程 765

3326:练55.1 合影效果

3326:练55.1 合影效果

青少年趣味编程 520

结合poj 2104,对于简单的归并树谈谈个人的理解和做法

题目:poj 2104 大意:给你一个长度为n的数列,每次查询数列下标为[i,j]区间里面升序排序后第k大的数 (我刚刚加入学校集训队暑假acm集训的时候遇到这题直接头铁sort。。。。现在想起来还真是天真) 由此引出归并树(其实这一题用主席树更快,点击传送!) 首先,区间升序排序第k大需要做一个小小的转换,不妨设那个数就是aim,就是区间内比aim小的&lt;k个,小于等于aim的&gt...

forOnward的博客 306

2026UPC夏季训练赛第一场

最后,作为暑假集训的开端,表达一下个人对集训以及自我在学习过程中的感悟:我们常常在意别人的状态,别人的成就,实则对于每个人自己来说,最重要的是相信自己,我们可能在这个过程中自我松懈,但是你一定要给松懈过的自己创造一个能过从头再来的条件,真正努力的人必须是享受努力的过程的,不然无法坚持下去,我今年才18岁,认知浅显,不可否认二十多岁的工作对后半生十分重要,但是人不应该只着眼于未来成就的那一刻,更应当在每次努力的过程中做好劳逸结合,做好对生活的享受,感悟自己的性格。每个板上都有一面是单词,另一面是图片。

g2257612654321的博客 209
上一篇: 2018年HPUACM暑期集训招新赛
下一篇: Bone Collector(01背包问题)
陶鸿杰
博客等级 码龄9年 93粉丝 298原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值