#include<cstdio> #include<vector> #include<cstring> #include<iostream> using namespace std; ; vector<int>a[MAXN]; int n,m,v[MAXN],vis[MAXN],dp[MAXN][MAXN]; void dfs(int root) { dp[root][] = v[root]; vis[root] = ; int i, len =…
L1-014. 简单题 时间限制 400 ms 内存限制 65536 kB 代码长度限制 8000 B 判题程序 Standard 作者 陈越 这次真的没骗你 —— 这道超级简单的题目没有任何输入. 你只需要在一行中输出事实:“This is a simple problem.”就可以了. #include<bits/stdc++.h> using namespace std; int main(){ printf("This is a simple problem.\n"…
Codeforces 828B Black Square(简单题) Description Polycarp has a checkered sheet of paper of size n × m. Polycarp painted some of cells with black, the others remained white. Inspired by Malevich's "Black Square", Polycarp wants to paint minimum pos…
Follow up for "Unique Paths": Now consider if some obstacles are added to the grids. How many unique paths would there be? An obstacle and empty space are marked as 1 and 0 respectively in the grid. For example, There is one obstacle in the midd…
Problem Description The school set up three elective courses, assuming that these courses are A, B, C. N classes of students enrolled in these courses.Now the school wants to count the number of students who enrolled in at least one course in each cl…