Codeforces Round #431 (Div. 2) From Y to Y
来源:互联网 发布:java string类源码分析 编辑:程序博客网 时间:2024/06/05 03:06
贼水的一道题,其实应该先做这个题的,先做难点的掉的分少,我发现了这个规律哎,先做简单的掉的分多,先做难的可能做不出来,有风险,所以应该得到高分值,以后从c开始做,或者从b开始不能从a开始做了。上分之路漫漫,500+
名次,好好把握以下应该能400+或者300+。好多人被弄下去了,开始都被弄到900+了,终测500+好开心。
#include<bits\stdc++.h>using namespace std;typedef long long ll;int main(){ int n;int sum[600];sum[0]=0;sum[1]=0;int i;for(i=2;i<=580;i++){ sum[i]=sum[i/2]+sum[i-i/2]+i/2*(i-i/2); if(sum[i]>100000)break;}//for(int i=2;i<=10;i++)printf("%d\n",sum[i]);scanf("%d",&n);if(n==0){printf("a");return 0;}int cnt=0;while(n){int j; for(j=2;j<=i;j++) { if(n<sum[j])break; } for(int k=1;k<=j-1;k++)printf("%c",('a'+cnt)); n-=sum[j-1]; cnt++;} return 0;}
阅读全文
0 0
- Codeforces Round #431 (Div. 2) From Y to Y
- Codeforces Round #431 (Div. 2) C. From Y to Y(补题)
- Codeforces Round #431 (Div. 2) 848A From Y to Y(思维)
- Codeforces Round #431 (Div. 2) A、Odds and Ends B、Tell Your World C、From Y to Y
- CodeForces #431 Div. 2 849C From Y to Y 贪心 技巧题
- Codeforces From Y to Y
- Codeforces 849 C From Y to Y
- Codeforces 849 C. From Y to Y (技巧)
- Codeforces 849C From Y to Y【思维】
- codeforces 848A From Y to Y(思维)
- Codeforces 849 C. From Y to Y 结论题
- Codeforces848A-From Y to Y
- C. From Y to Y
- Codeforces849C From Y to Y
- CF848A From Y to Y【思路】
- codeforce 848A From Y to Y
- CF 848 A. From Y to Y【模拟】
- Convert from type X to type Y
- 计算机组成知识整理2:RAID
- VC对话框添加菜单快捷键
- 第一篇
- web安全方向
- Coursera吴恩达《神经网络与深度学习》课程笔记(1)-- 深度学习概述
- Codeforces Round #431 (Div. 2) From Y to Y
- Codeforces Tell Your World
- 【codevs 1036】商务旅行
- Guava Cache使用笔记
- git 如何正确的提交文件
- cf 849B
- 欢迎使用CSDN-markdown编辑器
- git 使用详细介绍
- 快速排序及c++实现