tag里有二分,非常的神奇,我用暴力做的,等下去看看二分的题解

但是那个数组的大小是我瞎开的,但是居然没有问题233

#include <cstdio>
#include <cmath>
#include <cstring>
using namespace std;
const int N = 1e7;
int c[N];
int main() {
int t;
scanf("%d", &t);
while (t--) {
int n;
scanf("%d", &n);
int m = sqrt(n) + ;
memset(c, , sizeof(c));
int cnt = ;
for (int i = ; i <= m; i++)
c[cnt++] = n / i;
while (n >= m) {
m = n / (n / m) + ;
c[cnt++] = n / m;
}
printf("%d\n", cnt);
for (int i = cnt - ; i >= ; i--)
printf("%d ", c[i]);
puts("");
}
return ;
}

Codeforces Round #603 (Div. 2) C.Everyone is A Winner!的更多相关文章

  1. Codeforces Round #603 (Div. 2) C. Everyone is a Winner! (数学)

    链接: https://codeforces.com/contest/1263/problem/C 题意: On the well-known testing system MathForces, a ...

  2. Codeforces Round #603 (Div. 2) C. Everyone is a Winner! 二分

    C. Everyone is a Winner! On the well-known testing system MathForces, a draw of n rating units is ar ...

  3. Codeforces Round #603 (Div. 2) A. Sweet Problem(水.......没做出来)+C题

    Codeforces Round #603 (Div. 2) A. Sweet Problem A. Sweet Problem time limit per test 1 second memory ...

  4. Codeforces Round #603 (Div. 2) E. Editor 线段树

    E. Editor The development of a text editor is a hard problem. You need to implement an extra module ...

  5. Codeforces Round #603 (Div. 2) E. Editor(线段树)

    链接: https://codeforces.com/contest/1263/problem/E 题意: The development of a text editor is a hard pro ...

  6. Codeforces Round #603 (Div. 2) D. Secret Passwords 并查集

    D. Secret Passwords One unknown hacker wants to get the admin's password of AtForces testing system, ...

  7. Codeforces Round #603 (Div. 2) D. Secret Passwords(并查集)

    链接: https://codeforces.com/contest/1263/problem/D 题意: One unknown hacker wants to get the admin's pa ...

  8. Codeforces Round #603 (Div. 2) B. PIN Codes

    链接: https://codeforces.com/contest/1263/problem/B 题意: A PIN code is a string that consists of exactl ...

  9. Codeforces Round #603 (Div. 2) A. Sweet Problem(数学)

    链接: https://codeforces.com/contest/1263/problem/A 题意: You have three piles of candies: red, green an ...

随机推荐

  1. 快速建立使用django_rest_framework

    快速建立使用django_rest_framework 测试API 其实djangorestframework就是进行增删改查 前往要注意的是 POST的接口的的URL一定要写完整 包括最后的 `/` ...

  2. Debian 10 xfce 错误提示 ACCESS DENIED

    闲来无事重新安装自己的服务器发现很多关于Debian的初始安装问题都已经陌生了在此重新整理下自己安装所遇到的问题: ACCESS DENIED  释: 登录成功拒绝Root密码访问 解决方法: loc ...

  3. c#Socket通信基本使用

    基本流程 Server private void btnStart_Click(object sender, EventArgs e) { try { //当点击开始监听时在服务器端创建一个负责监视I ...

  4. L001.PyQt

    초보자를 위한 Python GUI 프로그래밍 - PyQt5 https://wikidocs.net/book/2944 https://freeprog.tistory.com/330?cat ...

  5. Wannafly Winter Camp 2020 Day 5B Bitset Master - 时间倒流

    有 \(n\) 个点的树,给定 \(m\) 次操作,每个点对应一个集合,初态下只有自己. 第 \(i\) 次操作给定参数 \(p_i\),意为把 \(p_i\) 这条边的两个点的集合合并,并分别发配回 ...

  6. 抛弃VMware吧,使用Win10自带的Hyper-V创建虚拟机

    个人博客 地址:https://www.wenhaofan.com/article/20190619221449 介绍 Hyper-V是微软提出的一种系统管理程序虚拟化技术,能够实现桌面虚拟化. 启动 ...

  7. object解构赋值

    let options = { title: 'menu', width: 100, height: 200 } //如果简写,变量名必须和属性名一致 let {title,width,height} ...

  8. 谷歌更新后,chromedriver如何更换新版本

    前天,更新了78版本的谷歌后,chromedriver便不能用了,于是在ChromeDriver仓库下载了相对应版本的chromedriver. 并且放入谷歌文件下C:\Program Files ( ...

  9. tensorflow模型的保存与加载

    模型的保存与加载一般有三种模式:save/load weights(最干净.最轻量级的方式,只保存网络参数,不保存网络状态),save/load entire model(最简单粗暴的方式,把网络所有 ...

  10. [POI2004]PRZ [枚举子集]

    怎么全是 模拟退火 啊,这明明是个 枚举子集 的板子题. 考虑 \(n \leq 16\) 二进制没错了.. \(dt_i\) 表示 \(i\) 这个状态下 \(\max{t_j}\),\([\tex ...