题目链接

参考代码:

#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(思维题)的更多相关文章

  1. CodeForces - 631C ——(思维题)

    Each month Blake gets the report containing main economic indicators of the company "Blake Tech ...

  2. CodeForces - 1102A(思维题)

    https://vjudge.net/problem/2135388/origin Describe You are given an integer sequence 1,2,-,n. You ha ...

  3. 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 ...

  4. Codeforces 1038D - Slime - [思维题][DP]

    题目链接:http://codeforces.com/problemset/problem/1038/D 题意: 给出 $n$ 个史莱姆,每个史莱姆有一个价值 $a[i]$,一个史莱姆可以吃掉相邻的史 ...

  5. CodeForces - 468A ——(思维题)

    Little X used to play a card game called "24 Game", but recently he has found it too easy. ...

  6. CodeForces - 669D——(思维题)

    Little Artem is fond of dancing. Most of all dances Artem likes rueda — Cuban dance that is danced b ...

  7. <每日一题> Day2:CodeForces-1141C.PolycarpRestoresPermutation(思维题)

    原题链接 参考代码: #include <iostream> #include <cstring> using namespace std; + , INF = 0x3f3f3 ...

  8. CodeForces - 589D —(思维题)

    Welcoming autumn evening is the best for walking along the boulevard and npeople decided to do so. T ...

  9. Sonya and Robots CodeForces - 1004C (思维题)

    Sonya and Robots time limit per test 1 second memory limit per test 256 megabytes input: standard in ...

随机推荐

  1. zookeeper之三 ZKClient客户端的使用

    ZKClient在原生API接口上进行了包装,同时在内部实现了诸如session超时重连.watcher反复注册等功能,使得zookeeper客户端繁琐的细节对开发人员透明.下面将从以下几个方面来使用 ...

  2. 【JavaScript】DOM之BOM

    BOM 1.BOM是什么 提供了独立页面内容,与浏览器相关的一系列对象,管理窗口之间通信 2.Window对象 具有双重角色,对象即是允许JS访问浏览器窗口的一个对象,和ECMAScript规范中的G ...

  3. Rails3:使用bundler管理gems

    Rails3:使用bundler管理gems bundler 是一套为了 Rails3 所打造的全新 Gem dependencies 管理工具:一套基于 Rubygems 的更高阶套件管理工具,适合 ...

  4. H5 FileReader对象

    前言:FileReader是一种异步文件读取机制,结合input:file可以很方便的读取本地文件. input:file 在介绍FileReader之前,先简单介绍input的file类型. < ...

  5. Spring Cloud(2)主要组件应用实例

    SpringCloud SpringCloud 为开发人员提供了快速构建分布式系统的一些工具,包括配置管理.服务发现.断路器.路由.负载均衡.微代理.事件总线.全局锁.决策竞选.分布式会话等等.它运行 ...

  6. Mac下Sublime text3无法安装Package Control及中文乱码问题

    sublime text3是一款轻量级的代码编辑器,我曾在Windows下配置过,但时间久了就忘了.这次是在mac上配置,在网上查了一些帖子,有的叙述不是很清楚,故记录一下详细过程. 在线安装: ht ...

  7. CF D. Labyrinth 01BFS

    由于上下走不限制,所以按照贪心,我们应该尽可能走上下方向. 我们可以开一个双端队列,并认为每次提取队首的时候得到的是到达该点的最优策略.(这个一定是唯一的,因为不可能向右走几格,然后再退回去. ) 那 ...

  8. leetcode打卡

    leetcode刷题打卡 刷题链接 夸夸群 刷题记录链接 期中颜色不一样的,是刷题中遇到问题的,以后需要强化 [x] 6.1 打卡 [x] 6.2 打卡 中间因个人原因没做题,后面慢慢补上 [x] 6 ...

  9. 三、angular7登录请求和路由带参传递

    在 app.module.ts 中引入 HttpClientModule 并注入 import {HttpClientModule} from '@angular/common/http'; impo ...

  10. 3D Computer Grapihcs Using OpenGL - 01 环境设置

    这系列文章是我学习Youtube上一套OpenGL教程的笔记,自己对教程的案例重新制作并且做了一定程度的修改(更有条理,且修正了一些问题).后续将持续更新. Visual Studio 2017工程 ...