博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
hdu 1273不会的题
阅读量:4544 次
发布时间:2019-06-08

本文共 677 字,大约阅读时间需要 2 分钟。

这题其实我不会,随便找了几个特例算算觉得答案可能是(n-1)/2就打了交,居然过了。可是不太理解这种做法的正确性,上网搜一下,也没人写解题报告,改天问问老师去……

/* * hdu1273/win.cpp * Created on: 2012-10-23 * Author    : ben */#include 
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;int main() {#ifndef ONLINE_JUDGE freopen("data.in", "r", stdin);#endif int N; while(scanf("%d", &N) == 1 && N != 0) { printf("%d\n", (N - 1) / 2); } return 0;}

转载于:https://www.cnblogs.com/moonbay/archive/2012/10/23/2736189.html

你可能感兴趣的文章
xml约束技术之dtd
查看>>
项目Beta冲刺(团队3/7)
查看>>
PHP和MySQL应用实战(更新完毕)
查看>>
使用switchshow/supportshow命令确认Brocade交换机型号(转载)
查看>>
KMP字符串模式匹配学习笔记
查看>>
设计模式 - 装饰器模式(Decorator)
查看>>
在线工具地址
查看>>
Binary Tree Right Side View
查看>>
Windows中安装BeautifulSoup
查看>>
题目1:删除排序数组中的重复数字
查看>>
爱奇艺在文本舆情挖掘上的技术探索和实践
查看>>
动手动脑-5
查看>>
wire [7:0] regAddr; 理解
查看>>
云存储的那些事(1)——数据冗余
查看>>
android状态机机制StateMachine
查看>>
滚动条自适应宽度的问题
查看>>
第二次作业——个人项目实战
查看>>
HighCharts图表控件在ASP.NET WebForm中的使用
查看>>
C#汉字转拼音
查看>>
Remote Service 和 Local App的交互
查看>>