码迷,mamicode.com
首页 > 其他好文 > 详细

【HDU2050】折线分割平面

时间:2016-10-14 23:51:39      阅读:163      评论:0      收藏:0      [点我收藏+]

标签:

Position

Solution

2×n^2-n+1

证明见分割问题

Code

// This file is made by YJinpeng,created by XuYike‘s black technology automatically.
// Copyright (C) 2016 ChangJun High School, Inc.
// I don‘t know what this program is.

#include <iostream>
#include <cstdio>
using namespace std;
int main()
{
    freopen("2050.in","r",stdin);
    freopen("2050.out","w",stdout);
    int n,t;scanf("%d",&t);
    while(t--)scanf("%d",&n),printf("%d\n",2*n*n-n+1);
    return 0;
}

 

【HDU2050】折线分割平面

标签:

原文地址:http://www.cnblogs.com/YJinpeng/p/5962349.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!