Halloween party

Halloween party

#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;

int main() {
    int T;
    unsigned long K;
    cin>>T;
    
    while(T >= 1 && T <= 10 && T--)
    {
        cin>>K;
        if(K >= 2 && K <= 10000000)
        {
            cout<<(K * K /4)<<endl;
        }
    }
    /* Enter your code here. Read input from STDIN. Print output to STDOUT */   
    return 0;
}
时间: 2024-10-10 01:19:39

Halloween party的相关文章

Halloween Costumes LightOJ - 1422

Gappu has a very busy weekend ahead of him. Because, next weekend is Halloween, and he is planning to attend as many parties as he can. Since it's Halloween, these parties are all costume parties, Gappu always selects his costumes in such a way that

POJ 3370 Halloween treats(抽屉原理)

Halloween treats Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 6631   Accepted: 2448   Special Judge Description Every year there is the same problem at Halloween: Each neighbour is only willing to give a certain total number of sweets

How to obtain free runescape eoc to 07 gold from RSorder as Halloween gift 10.31?

Follow these steps in order, where practical. {Click runescape 2007 gold sequences are shown for Windows XP Professional and are only meant to be a general guide}.Make Some BackupsYou need a fall back position in case bad things happen. Create an XP

POJ 3370 Halloween treats(抽屉原理)

题意  有c个小孩 n个大人万圣节搞活动  当小孩进入第i个大人家里时   这个大人就会给小孩a[i]个糖果  求小孩去哪几个大人家可以保证得到的糖果总数是小孩数c的整数倍  多种方案满足输出任意一种 用s[i]表示前i个打人给糖果数的总和  令s[0]=0  那么s[i]共有n+1种不同值  而s[i]%c最多有c种不同值  题目说了c<=n   所以s[i]%c肯定会有重复值了 这就是抽屉原理了   n个抽屉放大于n个苹果   至少有一个抽屉有大于等于2个苹果 就把s[i]%c的取值个数(c

LigntOj1422 Halloween Custumes

题意:n天,每天穿哪件衣服有要求,衣服可以套着穿,但是脱下来的衣服就不能再穿了,问最少要准备多少件衣服 题解:这是到区间DP,也算是我的第一道区间DP F[ i ][ j ] 表示从第 i 天到第 j 天最少要几件衣服. 倒着推,我们考虑需不需要第 ai 件衣服,有两种情况:① 需要,那么F[ i ][ j ] = F[ i + 1][ j ] + 1; ② 不需要,那么就在 i + 1 到 j 天找有没有和第 i 天穿的衣服一样的,有那么 F[ i ][ j ] = F[ i + 1][ k

poj 3370 Halloween treats(鸽巢原理)

Description Every year there is the same problem at Halloween: Each neighbour is only willing to give a certain total number of sweets on that day, no matter how many children call on him, so it may happen that a child will get nothing if it is too l

light oj 1422 - Halloween Costumes (区间dp)

1422 - Halloween Costumes PDF (English) Statistics Forum Time Limit: 2 second(s) Memory Limit: 32 MB Gappu has a very busy weekend ahead of him. Because, next weekend is Halloween, and he is planning to attend as many parties as he can. Since it's Ha

Lightoj 题目1422 - Halloween Costumes(区间DP)

1422 - Halloween Costumes   PDF (English) Statistics Forum Time Limit: 2 second(s) Memory Limit: 32 MB Gappu has a very busy weekend ahead of him. Because, next weekend is Halloween, and he is planning to attend as many parties as he can. Since it's

LightOJ 1422 Halloween Costumes (区间dp 好题)

1422 - Halloween Costumes PDF (English) Statistics Forum Time Limit: 2 second(s) Memory Limit: 32 MB Gappu has a very busy weekend ahead of him. Because, nextweekend is Halloween, and he is planning to attend as many parties as he can.Since it's Hall

[POJ 3370] Halloween treats

Halloween treats Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 7143   Accepted: 2641   Special Judge Description Every year there is the same problem at Halloween: Each neighbour is only willing to give a certain total number of sweets