首页
Python
Java
前端
数据库
Linux
Chatgpt专题
开发者工具箱
rong专题
fzu 2107 Hua Rong Dao(回溯)
题目链接:fzu 2107 Hua Rong Dao 题目大意:给出n(1≤n≤4)然后在一个n * 4的格子上放矩形,必须放一个2*2的(为题目背景下的曹操),然后剩余的位置要用三种矩形拼接。 解题思路:先枚举曹操的位置,然后用回溯的方式枚举出所有可能,计算总数。 #include <stdio.h>#include <string.h>const int N =
阅读更多...
nei'rong
静态库的创建 gcc -c 源文件。c ar rcs 静态库名(lib.a) 目标文件1 2 3 使用 gcc -o file flie.c -L. -lname 动态库的创建 gcc -shared -0FPIC -o 库名.so 源文件.c 使用 gcc 源文件.c ./库名.so -o 可执行文件名
阅读更多...
Hua Rong Dao FZU - 2107(dfs)
F - Hua Rong Dao 题目链接:FZU - 2107 题意, 4*n的格子, 放入一个2*2的格子, 若干横着的1*2的格子, 若干竖着放的2*1的格子, 若干1*1的格子, 问有几种方法使得4*n格子填满; #include <iostream>#include <stdio.h>#include <algorithm>#include <math.h>#includ
阅读更多...