HDU1214--圆桌会议 HDU(90)
来源:互联网 发布:js后退事件 编辑:程序博客网 时间:2024/05/19 13:59
#include <stdio.h>#include <iostream>#include <cmath>#include <cstring>using namespace std;int main(){ int n; while(cin>>n) { int x,f,z; f=n/2; x=n-f; z=f*(f-1)/2+x*(x-1)/2; cout<<z<<endl; } return 0;}
对于圆环来说,最好的办法就是对半分。
关于排序问题,就是1,2,3,4,5,6,->6,5,4,3,2,1即可,所以就是6冒泡上去,1冒泡下来。
圆环就是两段分别这么做,然后相加就好。
所以就1A。
- HDU1214--圆桌会议 HDU(90)
- HDU1214:圆桌会议(简单数论)
- hdu1214-圆桌会议
- hdu1214 圆桌会议
- hdu1214 圆桌会议
- hdu1214圆桌会议(数论)
- hdu1214 圆桌会议 水题
- 【公式题】HDU1214圆桌会议
- hdu1214 圆桌会议(数学:题意难懂+水题)
- HDU 1214 圆桌会议(思维)
- hdu-圆桌会议
- HDU-1214-圆桌会议(初等数论)
- HDU 1214 圆桌会议(好题)
- 【HDU】-1214-圆桌会议(数学,思维)
- hdu1214
- hdu 1214 圆桌会议
- hdu 1214 圆桌会议
- HDU 1214 圆桌会议
- [SOA] Mule ESB 3.x 入门(一)—— 消息流
- schema对象介绍
- HDOJ 4578/2013年杭州邀请赛C题 - Transformation 线段树...比较蛋疼的维护PushDown
- 导致物理内存使用率高的原因以及解决办法【xiame】
- grub快速修复
- HDU1214--圆桌会议 HDU(90)
- android,获取北京时区时间
- hdu(2831)Plants VS Zombies
- UFOs
- 机器学习基础-概率论知识点
- Windows 开发之注册表操作-UAC
- 浅谈协方差矩阵
- C/S与B/S的区别
- for循环语句头的执行顺序