Code #include <cstdio> #include <algorithm> #include <cstring> using namespace std; const int N = 512; int t, n, m, cnt; int cori[N], flag[N]; inline ...
转载 2021-09-14 22:15:00
64阅读
2评论
CoursesTime Limit: 20000/10000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4975    Accepted Submission(s): 2390Problem DescriptionConsider a group o
原创 2023-08-15 17:22:01
40阅读
#include #include
原创 2023-08-23 10:33:05
48阅读
题目描述 Description 现代数学的著名证明之一是Georg Cantor证明了有理数是可枚举的。他是用下面这一张表来证明这一命题的: 1/1 1/2 1/3 1/4 1/5 … 2/1 2/2 2/3 2/4 … 3/1 3/2 3/3 … 4/1 4/2 … 5/1 … … 我们以Z字形
原创 2021-06-04 20:03:42
144阅读
线段覆盖,注意从右往左挪的情况View Code #include <iostream>#include <cstdlib>#include <cstdio>#include <cstring>#include <algorithm>using namespace std;#define room_num 400#define maxn 205struct Elem{ bool start; int pos;}elem[maxn];int n;int elem_cnt;bool operator < (const Elem &a
转载 2012-12-29 20:20:00
78阅读
2评论
Given a list of N student records with name, ID and grade. You are supposed to sort the records with respect to the grade in non-increasing order, and
转载 2020-04-28 22:04:00
65阅读
2评论
1083. List Grades (25)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueGiven a list of N student records with name, I
原创 2022-08-30 10:28:33
36阅读
题目题意:给学生成绩排序,输出区间[a,b]的学生信息#include<iostream>#in ss a,struct...
原创 2023-06-27 10:16:29
63阅读
原题链接 考察:二分图匹配 上题学会如何分配集合,这题又学会哪个作为匹配的主动方... 正常思路是人到课,但是本题课到人更方便处理,猜想二分图应该是一对多做主动方 1 #include <iostream> 2 #include <cstring> 3 #include <algorithm> 4
转载 2021-01-23 14:50:00
57阅读
2评论
CoursesTime Limit: 20000/10000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1888Accepted Submission(s): 848Problem DescriptionConsider a group of N students and P courses. Each student visits zero, one or more than one courses. Your task is to determine whether it is
原创 2021-07-29 16:26:05
69阅读
一、内容 Consider a group of N students and P courses. Each student visits zero, one or more than one courses. Your task is to determine whether it is possible to form a committee of exactly P students t...
原创 2021-08-27 14:17:41
75阅读
一、内容 Consider a group of N students and P courses. Each student visits zero, one or more than one courses. Your task is to determine whether it is possible to form a committee of exactly P students t...
原创 2021-08-27 14:17:43
41阅读
题意:有P门课程,N个学生,每门课程有一些学生选读,
转载 2013-09-21 12:39:00
92阅读
一、内容 Consider a group of N students and P courses. Each student visits zero, one or more than one courses. Your task is to determine whethe
原创 2022-01-06 15:47:58
27阅读
现代数学的著名证明之一是Georg Cantor证明了有理数是可枚举的。他是用下面这一张表来证明这一命题的: 1/1 1/2 1/3 1/4 1/5 … 2/1 2/2 2/3 2/4 … 3/1 3/2 3/3 … 4/1 4/2 … 5/1 … … 我们以Z字形给上表的每一项编号。第一项是1/1,然后是1/2,2/1,3/1,2/2,…
C++
原创 2013-04-28 21:24:02
1231阅读
Moving TablesTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 29153 Accepted: 9711DescriptionThe famous ACM (Advanced Computer Maker) Company has rented
原创 2022-08-10 11:18:09
51阅读
Moving TablesTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 20479Accepted: 6717DescriptionThe famous ACM (Advanced Computer Maker) Company has rented a floor of a building whose shape is in the following figure. The floor has 200 rooms each on the north side and south side along the corrid
IT
原创 2021-07-29 16:17:54
101阅读
#include<iostream>//Prim算法#include<cstring>usingnamespacestd;intedge[55][55];structMST{intst,ed,w;}mst[100];intmain(){intp,r;while(cin>>p,p){cin>>r;for(inti=1;i<=p;++i)for(intj=1;j<=p;++j)edge[i][j]=200;inta,b,c;while(r--){cin>>a>>b>>c;edge[b][a]=edge[
转载 2011-07-13 11:57:00
46阅读
题目 1083: Hello, world!题解这题相对来所比较简单,就是做一个ASCII码数值与字符的对应。相对麻烦的是Python
原创 2022-02-15 10:47:57
68阅读
题目有如下所示的数塔,要求从顶层走到底层,若每一步只能走到相邻的结点,则经过的结点的数字之和最大是多少?并输出最大和的路径。 Input输入数据首先包括一个整数C,表示测试实例的个数,每个测试实例的第一行是一个整数N(1 <= N <= 100),表示数塔的高度,接下来用N行数字表示数塔,其中第i行有个i个整数,且所有的整数均在区间[0,99]内。 Output对于每个测试实例,输出
原创 2022-03-24 10:31:06
39阅读
  • 1
  • 2
  • 3
  • 4
  • 5