【HDU2050】折线分割平面

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;
}

 

posted @ 2016-10-14 22:32  _Mashiro  阅读(468)  评论(0编辑  收藏  举报