搜索--深搜--L - Oil Deposits

The GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large rectangular region of land at a time, and creates a grid that divides the land into numerous square plots. It then analyzes each plot separately, using sensing equipment to determine whether or not the plot contains oil. A plot containing oil is called a pocket. If two pockets are adjacent, then they are part of the same oil deposit. Oil deposits can be quite large and may contain numerous pockets. Your job is to determine how many different oil deposits are contained in a grid. 
InputThe input file contains one or more grids. Each grid begins with a line containing m and n, the number of rows and columns in the grid, separated by a single space. If m = 0 it signals the end of the input; otherwise 1 <= m <= 100 and 1 <= n <= 100. Following this are m lines of n characters each (not counting the end-of-line characters). Each character corresponds to one plot, and is either `*', representing the absence of oil, or `@', representing an oil pocket. 
OutputFor each grid, output the number of distinct oil deposits. Two different pockets are part of the same oil deposit if they are adjacent horizontally, vertically, or diagonally. An oil deposit will not contain more than 100 pockets. 
Sample Input
1 1
*
3 5
*@*@*
**@**
*@*@*
1 8
@@****@*
5 5 
****@
*@@*@
*@**@
@@@*@
@@**@

0 0


t题目:

  求连通块的个数,深搜即可。

    #include<algorithm>
    #include<iostream>
    #include<cstring>
    #include<cmath>
    using namespace std;
    int dir[8][2]={{1,0},{-1,0},{0,1},{0,-1},{1,1},{1,-1},{-1,1},{-1,-1}};
    char cc[110][110];
    int n,m;
    int cnt;
    void dfs(int x,int y)
    {
    	if(x<0||x>n||y<0||y>m||cc[x][y]!='@')
    	    return ;
    	cc[x][y]='*';//找的了就标记
    	for(int i=0;i<8;i++)
    	{
    		int newx=x+dir[i][0];
    		int newy=y+dir[i][1];
    		dfs(newx,newy);
		}
	}
	int main()
	{
		
		while(scanf("%d%d",&n,&m)!=EOF)
		{
			if(n==0&&m==0)  break;
			cnt=0;
			for(int i=0;i<n;i++)
			   scanf("%s",cc[i]);
			for(int i=0;i<n;i++)
			{
				for(int j=0;j<m;j++)
				{
					if(cc[i][j]=='@')
					{
						cnt++;
						dfs(i,j);
					}
				}
			}
			cout<<cnt<<endl;
		}
		return 0;
	}

SAP RE-FX 模块是 SAP 系统中用于管理房地产租赁和合同的子模块,主要面向商业地产管理领域。该模块提供了全面的租赁合同管理功能,包括租金计算、费用分摊、账务处理以及合规性报告等。RE-FX 模块特别适用于需要处理大量租赁合同的企业,例如房地产公司、购物中心运营商或物业管理公司。 在功能方面,SAP RE-FX 支持多种类型的租赁合同管理,如商业租赁、住宅租赁和零售租赁。系统允许用户定义不同的合同条款,包括基本租金、附加费用、调整规则(如 CPI 调整)以及免租期等。通过条件技术,RE-FX 可以灵活配置各种租金计算逻辑,并与财务模块(FI/CO)紧密集成,确保租赁收入和支出的自动过账[^3]。 此外,SAP RE-FX 提供了详细的报表和分析工具,帮助企业进行租赁组合管理和决策支持。它还支持多会计准则下的财务披露要求,特别是在 IFRS 16 和 ASC 842 等新租赁会计准则下,RE-FX 在 S/4HANA 中进一步增强了对租赁负债和使用权资产的管理能力。 关于财务会计(FI)侧的配置,SAP RE-FX 需要完成以下关键步骤: 1. **主数据设置**: - 定义业务交易类型(Transaction Types),用于区分不同类型的租赁活动。 - 维护科目分配(Account Assignment),将租赁收入、押金、费用等对应到总账科目。 - 设置评估类(Valuation Class),以便在总账中区分不同的租赁资产或负债。 2. **合同配置**: - 定义合同类别和合同类型,以满足不同类型租赁的业务需求。 - 配置租金条件类型(Condition Types),实现租金的自动计算。 - 设置折旧参数(Depreciation Parameters),特别是针对 IFRS 16 的使用权资产折旧。 3. **集成配置**: - 配置 RE-FX 与 FI/CO 的集成接口,确保租金发票、押金收付等信息能够自动传输至财务模块。 - 设置自动抵消规则,尤其是在集团内部租赁交易中,避免重复计费和账务错误。 4. **报表与输出管理**: - 配置租赁合同相关的标准报表,如租金明细表、应收租金汇总表、租赁合同到期提醒等。 - 设置输出控制(Output Control),定义租赁通知、催款函等文档的生成方式。 以下是 RE-FX 中一个简单的科目分配配置示例: ```abap * 租金收入科目配置示例 Transaction Code: OBH2 Path: Real Estate Management → Business Transactions → Rent → Revenue Accounts * 押金科目配置示例 Transaction Code: OBH2 Path: Real Estate Management → Business Transactions → Deposits → Account Determination ``` 对于企业实施 SAP RE-FX 模块,建议结合实际业务流程进行定制化配置,并充分测试主数据与 FI/CO 的集成效果,以确保系统的稳定运行和财务数据的准确性。
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值