摘要:
题意:给定一底面积为正方形的方体并装入x体积的水,问最大倾斜角度使得水不流出 如图所示只有两种情况且面积具有单调性 二分求解即可 /* Zeolim - An AC a day keeps the bug away */ //#pragma GCC optimize(2) //#pragma GCC 阅读全文
摘要:
A - Pens and Pencils emm题意忘了 B - Rooms and Staircases 有两层房子,每层有k间 每间要么是0要么是1 0只能左右, 1可以上下 问最多能走多少间。 不用考虑上下左右来回走,枚举每个转折上面走最大下面走最大更新极值即可,来回走必然不如这样优 /* Z 阅读全文
摘要:
A题意:使得全部数初二上取整或下取整加和后 用python取整输出就行 import math n = int(input()) cnt = 0 while n : x = int(input()) if x & 1: if cnt & 1: print( math.floor(x / 2) ) e 阅读全文