一. 函数函数是组织好的,可重复使用的,用来实现单一,或相关联功能的代码段。函数能提高应用的模块性,和代码的重复利用率。 上一课里提到了Python的很多内置函数。在此主要讲自定义函数。1. 定义函数的规则:以def关键词开头,后接函数标识符名称和圆括号()。 注意用规范的函数名任何传入参数和自变量必须放在圆括号中间。圆括号之间可以用于定义参数。函数的第一行语句可以文档字符串—用于存放函数注释说明
转载 2023-08-08 14:25:04
69阅读
简单最大匹配数问题
转载 2019-02-13 16:13:00
90阅读
2评论
Selecting Courses Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 10627 Accepted: 4803 Description It is well known that it is not easy to
转载 2020-06-24 20:21:00
80阅读
2评论
// <![CDATA[ /* @licstart The following is the entire license notice for the JavaScript code in this tag. Copyright (C) 2012-2013 Free Software Founda
原创 2021-07-28 13:48:11
224阅读
http://poj.org/problem?id=1469 网络流跑二分图模板题 #include<iostream> #include<cstdio> #include<queue> #include<algorithm> #include<cmath> #include<ctime> #inc
转载 2020-08-04 20:33:00
80阅读
2评论
COURSES Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 20478 Accepted: 8056 Description Consider a group of N studen...
转载 2016-05-18 00:15:00
58阅读
2评论
Beginning C++ Programming - From Beginner to Beyond https://www.udemy.com/course/beginning-c-plus-plus-programming/ Abdul Bari: Learn C++ Programming ...
转载 2021-08-15 12:44:00
40阅读
2评论
题意: 给你p门课程和n个学生,一个学生可以选0门,1门,或者多门课程,现在要求一个由p个学生组成的集合,满足下列2个条件: 1.每个学生选择一个不同的课程 2.每个课程都有不同的代表 如果满足,就输出YES 否则,输出NO #include<cstdio> #include<iostream> #
转载 2016-07-01 10:59:00
44阅读
2评论
COURSESTime Limit:1000MSMemory Limit:10000KTotal Submissions:17154Accepted:6741DescriptionConsider a group of N students and P courses. Each student v...
转载 2014-07-24 13:38:00
29阅读
原题链接 考察:二分图匹配 上题学会如何分配集合,这题又学会哪个作为匹配的主动方... 正常思路是人到课,但是本题课到人更方便处理,猜想二分图应该是一对多做主动方 1 #include <iostream> 2 #include <cstring> 3 #include <algorithm> 4
转载 2021-01-23 14:50:00
57阅读
2评论
Lecture 1:Demonstrate the columns of a matrix (imagine the vectors) in N-dimension space.How to multiply a matrix by a vector -- a different way, mult
转载 2017-04-08 23:50:00
108阅读
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阅读
// poj4 1469 COURSES// 题意: 现在有p门课程和n个学生,给出每门课程都有哪些学生可以参加.// 问能否找到p个学生,满足每个学生代表一门课程而且每门课程只由一个学生代表// 思路:求解二分图的最大匹配数,看与p是否相等#include<iostream> //二分图的最大匹配#include<cstring>using namespace std;int p,n;int link[305]; // link[ b ] = a 表示 V2中的点b 与 V1中的点a 相匹配int edge[105][305],vis[305]; // ed...
转载 2011-07-22 14:52:00
28阅读
2评论
一、内容 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阅读
CoursesTime Limit: 20000/10000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 5214Accepted Submission(s): 2502Problem D...
转载 2015-11-11 21:30:00
122阅读
2评论
题意:有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阅读
Selecting CoursesTime Limit: 1000msMemory Limit: 65536KBThis problem will be judged onPKU. Original ID:223964-bit integer IO format:%lld Java class na...
转载 2015-10-03 21:24:00
59阅读
Description
原创 2022-12-07 14:17:23
59阅读
  • 1
  • 2
  • 3
  • 4
  • 5