水题

 #include<iostream>
#include<string>
#include<algorithm>
#include<cstdlib>
#include<cstdio>
#include<set>
#include<map>
#include<vector>
#include<cstring>
#include<stack>
#include<cmath>
#include<queue>
#define clc(a,b) memset(a,b,sizeof(a))
#include <bits/stdc++.h>
using namespace std;
#define LL long long int main()
{
char s[][];
int n;
scanf("%d",&n);
for(int i=;i<n;i++)
scanf("%s",&s[i]);
LL tot=;
LL ans=;
for(int i=;i<n;i++)
{
tot=;
for(int j=;j<n;j++)
{
if(s[i][j]=='C')
tot++;
}
ans+=tot*(tot-)/;
tot=;
for(int j=;j<n;j++)
{
if(s[j][i]=='C')
tot++;
}
ans+=tot*(tot-)/;
}
cout<<ans<<endl;
return ;
}

Codeforces Round #343 (Div. 2) A. Far Relative’s Birthday Cake的更多相关文章

  1. Codeforces Round #343 (Div. 2) A. Far Relative’s Birthday Cake 水题

    A. Far Relative's Birthday Cake 题目连接: http://www.codeforces.com/contest/629/problem/A Description Do ...

  2. Codeforces Round #343 (Div. 2)-629A. Far Relative’s Birthday Cake 629B. Far Relative’s Problem

    A. Far Relative's Birthday Cake time limit per test 1 second memory limit per test 256 megabytes inp ...

  3. Codeforces Round #343 (Div. 2) A. Far Relative’s Birthday Cake【暴力/组合数】

    A. Far Relative’s Birthday Cake time limit per test 1 second memory limit per test 256 megabytes inp ...

  4. Codeforces Round #343 (Div. 2) B. Far Relative’s Problem 暴力

    B. Far Relative's Problem 题目连接: http://www.codeforces.com/contest/629/problem/B Description Famil Do ...

  5. Codeforces Round #343 (Div. 2) B. Far Relative’s Problem

    题意:n个人,在规定时间范围内,找到最多有多少对男女能一起出面. 思路:ans=max(2*min(一天中有多少个人能出面)) #include<iostream> #include< ...

  6. Codeforces Round #343 (Div. 2)

    居然补完了 组合 A - Far Relative’s Birthday Cake import java.util.*; import java.io.*; public class Main { ...

  7. Codeforces Round #343 (Div. 2) A

    A. Far Relative’s Birthday Cake time limit per test 1 second memory limit per test 256 megabytes inp ...

  8. Codeforces Round #343 (Div. 2)【A,B水题】

    A. Far Relative's Birthday Cake 题意: 求在同一行.同一列的巧克力对数. 分析: 水题~样例搞明白再下笔! 代码: #include<iostream> u ...

  9. Codeforces Round #343 (Div. 2) B

    B. Far Relative’s Problem time limit per test 2 seconds memory limit per test 256 megabytes input st ...

随机推荐

  1. dataTable 禁止排序

    $("#id").DataTable({ "ordering": false, // 禁止排序 });

  2. 【重构】m站重构思路

    不重构全部模块,只对以下内容做基础重构就可以,第三方方式 1.验证码作为独立的服务,用户写入验证码获得id,服务端获取验证码id对应内容(根据时间和存储空间 清理验证码) 2.支付接口h5环境独立配置 ...

  3. custom event in javascript and jquery

    javascript: // add a eventListener document.addEventListener("abc", function(){alert('this ...

  4. <四> jQuery 事件

    $(document).ready(function) 将函数绑定到文档的就绪事件(当文档完成加载时) $(selector).click(function) 触发或将函数绑定到被选元素的点击事件 $ ...

  5. hdu 3303 Harmony Forever (线段树 + 抽屉原理)

    http://acm.hdu.edu.cn/showproblem.php?pid=3303 Harmony Forever Time Limit: 20000/10000 MS (Java/Othe ...

  6. 解决iphone safari上的圆角问题

    -webkit-appearance : none ; /*解决iphone safari上的圆角问题*/

  7. POJ2201+RMQ

    /* RMQ */ #include<stdio.h> #include<string.h> #include<stdlib.h> #include<algo ...

  8. PHP 系统常量及自定义常量

    __FILE__ 这个默认常量是 PHP 程序文件名.若引用文件 (include 或 require)则在引用文件内的该常量为引用文件名,而不是引用它的文件名. __LINE__ 这个默认常量是 P ...

  9. easyui源码翻译1.32--EasyLoader(简单加载)

    前言 扩展自$.fn.datebox.defaults,使用$.fn.datetimebox.defaults重写默认值对象.下载该插件翻译源码 源码 /** * jQuery EasyUI 1.3. ...

  10. LINQ TO SQL 怎样 执行存储过程并返回存储过程的临时表

    查了GOOGLE一下,这种办法可以解决 我的存储过程是这样的: CREATE procedure cal_month_dep_fast  @begdt datetime,@endt datetime ...