HDU6298(2018多校第一场)
Bryce1010模板
http://acm.hdu.edu.cn/showproblem.php?pid=6298
打表找规律:
#include<bits/stdc++.h>
using namespace std;
#define ll long long
const int MAXN = 1e5 + 5;
int main() {
ll t,n;
scanf("%lld",&t);
ll ans;
while(t--)
{
scanf("%lld",&n);
if(n%3==0)
ans=(n/3)*(n/3)*(n/3);
else if(n%4==0)
ans=(n/2)*(n/4)*(n/4);
else ans=-1;
printf("%lld\n",ans);
}
return 0;
}
HDU6298(2018多校第一场)的更多相关文章
- Time Zone 【模拟时区转换】(HDU暑假2018多校第一场)
传送门:http://acm.hdu.edu.cn/showproblem.php?pid=6308 Time Zone Time Limit: 2000/1000 MS (Java/Others) ...
- 【2018多校第一场】hdu6308-Time Zone(日期)
Problem Description Chiaki often participates in international competitive programming contests. The ...
- HDU6300(2018多校第一场)
Bryce1010模板 http://acm.hdu.edu.cn/showproblem.php?pid=6300 排个序就好了 #include<iostream> #include& ...
- HDU6301(2018多校第一场)
Bryce1010模板 http://acm.hdu.edu.cn/showproblem.php?pid=6301 队友AC的,没怎么看 #include<iostream> #incl ...
- HDU6308(2018多校第一场)
Bryce1010模板 http://acm.hdu.edu.cn/showproblem.php?pid=6308 将时间化简为分钟计算,同时不要用浮点数计算,精度会出现问题: 如果采用精度,最好加 ...
- HDU6299(2018多校第一场)
Bryce1010模板 http://acm.hdu.edu.cn/showproblem.php?pid=6299 两个字符串的排序可以分成四种情况: (1)str1左少右多 vs str2 左多右 ...
- 2019牛客多校第一场 I Points Division(动态规划+线段树)
2019牛客多校第一场 I Points Division(动态规划+线段树) 传送门:https://ac.nowcoder.com/acm/contest/881/I 题意: 给你n个点,每个点有 ...
- 牛客多校第一场 B Inergratiion
牛客多校第一场 B Inergratiion 传送门:https://ac.nowcoder.com/acm/contest/881/B 题意: 给你一个 [求值为多少 题解: 根据线代的知识 我们可 ...
- HDU6581 Vacation (HDU2019多校第一场1004)
HDU6581 Vacation (HDU2019多校第一场1004) 传送门:http://acm.hdu.edu.cn/showproblem.php?pid=6581 题意: 给你n+1辆汽车, ...
随机推荐
- pypi指定下载源
pip install -i http://pypi.douban.com/simple/ scipy==0.19.0
- 打造基于Ubuntu+XBMC的家庭媒体中心
作为一名高清爱好者,一直想配置一台HTPC放家里实现高清播放外加家庭服务器功能.Nvidia的Ion平台自然是高清平台的硬件首选,而家庭媒体中心的软件端则首先考虑开发的已经很成熟的开源利器 XBMC ...
- php排序方法之选择排序
//选择排序法 $arr = array(3,55,45,2,67,76,6.7,-65,85,4); function selectSort($arr){ for ( $i=0; $i<cou ...
- js 分享代码--完整示例代码
<div class="bdsharebuttonbox" data-tag="share_1"> <a class="bds_ms ...
- 解决Spring MVC中文乱码
在web.xml中设置编码过滤器 <filter> <filter-name>characterEncodingFilter</filter-name> <f ...
- 树堆(Treap)
平衡树 简介: 平衡二叉树(Balanced Binary Tree)具有以下性质:它是一 棵空树或它的左右两个子树的高度差的绝对值不超过1,并且左右两个子树都是一棵平衡二叉树.平衡二叉树的常用实现方 ...
- bzoj 2169 连边——去重的思想
题目:https://www.lydsy.com/JudgeOnline/problem.php?id=2169 如果之前都去好重了,可以看作这次连的边只会和上一次连的边重复. 可以认为从上上次的状态 ...
- JAVA 内部类 (一)
可将一个类定义置入另一个类定义中.这就叫作“内部类”.内部类对我们非常有用,因为利用它可对那些逻辑上相互联系的类进行分组,并可控制一个类在另一个类里的“可见性”.然而,我们必须认识到内部类与以前讲述的 ...
- junit4 Assert静态方法及API
junit中的assert方法全部放在Assert类中. 1.assertTrue/False([String message,]boolean condition); 用来查看变量是是否为fa ...
- Coding 两步认证技术介绍
什么是两步认证 在介绍两步认证之前,首先来看下目前主流的几种认证方式. 上图中的认证方式大体上可以分为三大类 1.You know : 比如密码,这种只有我们知道的 2.You are : 比如指纹, ...