<每日一题> Day1:CodeForces.1140D.MinimumTriangulation(思维题)
参考代码:
#include <iostream>
using namespace std; int main() {
long long ans = ;
int n;
cin >> n;
for(int i = ; i <= n; i ++) {
ans += i * (i - );
}
cout << ans << endl;
return ;
}
<每日一题> Day1:CodeForces.1140D.MinimumTriangulation(思维题)的更多相关文章
- CodeForces - 631C ——(思维题)
Each month Blake gets the report containing main economic indicators of the company "Blake Tech ...
- CodeForces - 1102A(思维题)
https://vjudge.net/problem/2135388/origin Describe You are given an integer sequence 1,2,-,n. You ha ...
- Codeforces Round #416 (Div. 2)(A,思维题,暴力,B,思维题,暴力)
A. Vladik and Courtesy time limit per test:2 seconds memory limit per test:256 megabytes input:stand ...
- Codeforces 1038D - Slime - [思维题][DP]
题目链接:http://codeforces.com/problemset/problem/1038/D 题意: 给出 $n$ 个史莱姆,每个史莱姆有一个价值 $a[i]$,一个史莱姆可以吃掉相邻的史 ...
- CodeForces - 468A ——(思维题)
Little X used to play a card game called "24 Game", but recently he has found it too easy. ...
- CodeForces - 669D——(思维题)
Little Artem is fond of dancing. Most of all dances Artem likes rueda — Cuban dance that is danced b ...
- <每日一题> Day2:CodeForces-1141C.PolycarpRestoresPermutation(思维题)
原题链接 参考代码: #include <iostream> #include <cstring> using namespace std; + , INF = 0x3f3f3 ...
- CodeForces - 589D —(思维题)
Welcoming autumn evening is the best for walking along the boulevard and npeople decided to do so. T ...
- Sonya and Robots CodeForces - 1004C (思维题)
Sonya and Robots time limit per test 1 second memory limit per test 256 megabytes input: standard in ...
随机推荐
- CSS3边框 阴影 box-shadow
box-shadow是向盒子添加阴影.支持添加一个或者多个. box-shadow: X轴偏移量 Y轴偏移量 [阴影模糊半径] [阴影扩展半径] [阴影颜色] [投影方式]; 参数介绍: box-sh ...
- CSS——相对定位、绝对定位、固定定位
相对定位: position:relative 当元素被设置相对定位或是绝对定位后,将自动产生层叠,他们的层叠级别自然的高于文本流,除非设置其z-index值为负值. 并且我们发现当相对定位元素进行位 ...
- 《转》tensorflow学习笔记
from http://m.blog.csdn.net/shengshengwang/article/details/75235860 1. RNN结构 解析: (1)one to one表示单输入单 ...
- linux运维、架构之路-MySQL(二)
一.SQL语句实战 1.DDL语句——库管理 ①查看数据库 show databases; show databases like 'word%';#模糊查询数据库 ②创建数据库 create dat ...
- Python3 实现FTP功能
目录结构: FTP_project/ ├── FTP_client │ ├── ftp_client.py │ └── __init__.py └── FTP_server ├── bin │ ...
- Java框架之MybatisSQL注入漏洞
一.SQL注入漏洞基本原理 在常见的web漏洞中,SQL注入漏洞较为常见,危害也较大.攻击者一旦利用系统中存在的SQL注入漏洞来发起攻击,在条件允许的情况下,不仅可以获取整站数据,还可通过进一步的渗透 ...
- input 的type类型值
input有很多属性,我们先来说一下最原始的,也就是HTML5之前的 1)text: 定义单行的输入字段,可扎起其中输入文本 2)password:定义密码字段,会显示自符掩码 3)file: 定义输 ...
- JavaScript toFixed()、toExponential、toPrecision方法
JavaScript toFixed() 定义和用法 toFixed() 方法可把 Number 四舍五入为指定小数位数的数字. 语法 NumberObject.toFixed(num) 参数 描述 ...
- 13-1 jquery操作cookie
jQuery之cookie操作 Cookies 定义:让网站服务器把少量数据存储到客户端的硬盘或内存,从客户端的硬盘里读取数据的一种技术; 下载与引入:jquery.cookie.js基于jquery ...
- str_pad()函数
str_pad - 使用另一个字符串填充字符串为指定长度 <?php $str = 'hello world '; echo str_pad($str,20,'·'); ?> 结果 ...