水题

 #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. bottle + vue.js 打造你的单页应用

    看到各种单页应用之后,觉得单页应用简直酷毙了,作为一个技术宅,在假期的 时候恶补了一下vue ,觉得还不错,不过想想前端的东西毕竟还是太广博了.我也不知道怎么写反正应用起来有点别扭,就是资料太少了,成 ...

  2. 安装ARM调试器

    一.概述 1.调试ARM应用程序的软硬件组成 硬件JTAG/SWD仿真器 Eclipse调试插件 GDB调试客户端 GDB服务器端 JTAG/SWD需要的硬件驱动 2.GNU ARM Eclipse推 ...

  3. how to run demo city bars using sencha architect

    1. create a project using city bars template in sencha architect 2. save your project name as CityBa ...

  4. 认识变量------JAVA

    声明变量: variables must have a type variables must have a name int count // type int //count name 变量就是杯 ...

  5. yum安装软件时提示软件包没有签名

    yum install [XXX] -y --nogpgcheck

  6. 下拉框点链接js

    $("#input_text").click(function(){ $("#input_fonts").show(); }); $("#input_ ...

  7. Oracle----Key Word

    desc|describe table_name DCL----column ----add -- add one column alter table product ); -- add multi ...

  8. 练习PYTHON之GEVENT

    这个只是作了第一个样例,里面还有很多高级的技巧,希望以后用得着. 我觉得因为以前看过几本LINUX内核,关于异步非阻塞IO,信号,锁之类的,所以理解起来,还可以. import gevent def ...

  9. android 提示用户是否退出应用程序 提升用户体验

    首先明确一点,用户的一直点击的返回键,之后就会退出到桌面.那么,如何提示呢?很简单,在用户一顿返回键回到程序入口处(即程序的第一个Activity)给用户一个提示,您再按可就退出程序啦?那么如何在程序 ...

  10. NEERC 2010, Eastern subregional contest

    只能把补了的题目放这儿了,先留个坑,怕忘记. Problem G URAL 1806 Mobile Telegraphs 题意是:给定n个电话号码,每个号码是一个长度为10的仅含'0'~'9'的字符串 ...