摘要:
https://www.acwing.com/problem/content/293/ 给定一个空矩阵,问用1*2的矩形将其填满存在多少种方案。 可以只考虑一种,如果横的都已经确定了,那么竖的只有0或者1种放法,所以只考虑横的就好了(只考虑竖的也行) 暴搜复杂度为O(N! * M!),所以只能考虑动 阅读全文
posted @ 2021-03-26 09:47
greenofyu
阅读(90)
评论(0)
推荐(0)
摘要:
https://www.acwing.com/problem/content/3260/ 水题。 每次记录上一次连续多少次跳到了中心即可。 1 #include<iostream> 2 using namespace std; 3 int main(void){ 4 int res=0,point= 阅读全文
posted @ 2021-03-26 09:45
greenofyu
阅读(51)
评论(0)
推荐(0)
摘要:
https://www.acwing.com/problem/content/3230/ 利用标记变量。 1 #include<iostream> 2 using namespace std; 3 const int N=1010; 4 int a[N]; 5 int main(void){ 6 i 阅读全文
posted @ 2021-03-26 09:44
greenofyu
阅读(41)
评论(0)
推荐(0)
摘要:
https://www.acwing.com/problem/content/3235/ 水题。 1 #include<iostream> 2 #include<cmath> 3 using namespace std; 4 int main(void){ 5 int n; 6 cin>>n; 7 阅读全文
posted @ 2021-03-26 09:40
greenofyu
阅读(34)
评论(0)
推荐(0)
摘要:
https://www.acwing.com/problem/content/3206/ 水题。 1 #include<iostream> 2 using namespace std; 3 bool st[110][110]; 4 int main(void){ 5 int n; 6 cin>>n; 阅读全文
posted @ 2021-03-26 09:39
greenofyu
阅读(58)
评论(0)
推荐(0)
摘要:
https://www.acwing.com/problem/content/3211/ 直接看成两个三角形(略显复杂) 1 #include<iostream> 2 using namespace std; 3 const int N=500; 4 int a[N][N]; 5 int main( 阅读全文
posted @ 2021-03-26 09:38
greenofyu
阅读(86)
评论(0)
推荐(0)
浙公网安备 33010602011771号