上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 17 下一页
摘要: https://www.luogu.com.cn/problem/P2241 方法一:暴力(30分)分少总比0分强,其他测试点都显示TLE 1 #include<bits/stdc++.h> 2 using namespace std; 3 4 int main() 5 { 6 int n, m, 阅读全文
posted @ 2020-07-14 10:57 TFLSNOI 阅读(330) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://ybt.ssoier.cn:8088/problem_show.php?pid=1974 方法一: 1 #include<iostream> 2 using namespace std; 3 int main() 4 { 5 int i,j,y,m,d,t,date1,dat 阅读全文
posted @ 2020-07-10 15:12 TFLSNOI 阅读(865) 评论(0) 推荐(1) 编辑
摘要: 1 #include<iostream> 2 #include<cstring> 3 using namespace std; 4 int main() 5 { 6 7 int h, s; 8 string str;//或 char str[105] 9 cin>>h>>s; 10 cin>>str 阅读全文
posted @ 2020-07-10 14:28 TFLSNOI 阅读(296) 评论(0) 推荐(0) 编辑
摘要: 【题目描述】 假期时,TFLSOIers最喜欢的事情是到学校学习C++编程,糟糕的是学习编程的机房在11层,世界上最痛苦的事莫过于爬楼梯。假设爬到11层共有N个台阶,TFLSOIers从下往上爬楼梯,一步可以跨一级台阶,也可以跨两级台阶。问:他们爬到第N个台阶有多少种走法? 【输入格式】 一行一个整 阅读全文
posted @ 2020-07-10 07:41 TFLSNOI 阅读(612) 评论(1) 推荐(1) 编辑
摘要: 题目链接:https://www.luogu.com.cn/problem/P1601 1 #include<bits/stdc++.h> 2 using namespace std; 3 int a[505], b[505]; 4 int ans[510]; 5 int main() 6 { 7 阅读全文
posted @ 2020-07-03 16:01 TFLSNOI 阅读(161) 评论(0) 推荐(0) 编辑
摘要: https://www.luogu.com.cn/problem/P2678 关键词:二分套二分,时间复杂度为logL * N * logN 1 #include<bits/stdc++.h> 2 using namespace std; 3 int ll, n, m, a[50005]; 4 in 阅读全文
posted @ 2020-06-30 09:34 TFLSNOI 阅读(156) 评论(0) 推荐(0) 编辑
摘要: https://www.luogu.com.cn/problem/P2440 1 #include<bits/stdc++.h> 2 using namespace std; 3 int n, k, a[100005], max_a=-1; 4 int check(int kk){ 5 int re 阅读全文
posted @ 2020-06-29 16:04 TFLSNOI 阅读(271) 评论(0) 推荐(0) 编辑
摘要: 视频学习链接:https://www.bilibili.com/video/av925583617/ 二分初学者一定要认真熟练将以下模版练习并将逻辑理解清楚 1 #include<bits/stdc++.h> 2 using namespace std; 3 int a[10]={1,3,5,7,9 阅读全文
posted @ 2020-06-29 09:06 TFLSNOI 阅读(241) 评论(0) 推荐(0) 编辑
摘要: https://www.luogu.com.cn/problem/P1678 方法一:手写二分 #include<bits/stdc++.h> using namespace std; int m, n, a[100005], b; long long ans; int bs(int p){//二分 阅读全文
posted @ 2020-06-28 18:24 TFLSNOI 阅读(300) 评论(0) 推荐(0) 编辑
摘要: https://ac.nowcoder.com/acm/problem/205055 二分答案+贪心 思路:想要二分的找到最小需要看的天数的话,其实就应该要求出在一定天数间能获得的最大知识点。贪心策略就是优先看知识点数高的书。所以我们可以先将原序列按知识点从大到小排列,再按照看书天数将书分为不同集合 阅读全文
posted @ 2020-06-28 08:57 TFLSNOI 阅读(185) 评论(0) 推荐(0) 编辑
摘要: https://www.luogu.com.cn/problem/P1024 方法一:暴力枚举 #include<bits/stdc++.h> using namespace std; double a, b, c, d, fx; int main() { cin>>a>>b>>c>>d; for( 阅读全文
posted @ 2020-06-27 15:21 TFLSNOI 阅读(234) 评论(0) 推荐(0) 编辑
摘要: https://www.luogu.com.cn/problem/P1873 #include<bits/stdc++.h> using namespace std; int n, m, a[1000005], max_h=-1; bool check(int h){ long long sum=0 阅读全文
posted @ 2020-06-24 21:15 TFLSNOI 阅读(266) 评论(0) 推荐(0) 编辑
摘要: https://www.luogu.com.cn/problem/P1102 方法一:计数(只能拿92,有一个测试点过不了) #include<bits/stdc++.h> using namespace std; int n, c, a[200005]; int b[1<<28];//注意数组最大 阅读全文
posted @ 2020-06-24 16:53 TFLSNOI 阅读(200) 评论(0) 推荐(0) 编辑
摘要: https://www.luogu.com.cn/problem/P2249 方法一:二分手写模板 #include<bits/stdc++.h> using namespace std; int n, m, a[1000005], q; int seach(int x){ int ret=-1; 阅读全文
posted @ 2020-06-24 16:33 TFLSNOI 阅读(339) 评论(0) 推荐(0) 编辑
摘要: https://www.luogu.com.cn/problem/P5143 涉及知识点:结构体、sort参数、函数(结构体参数)、排序 #include<bits/stdc++.h> using namespace std; struct p{ int x, y, z; void input(){ 阅读全文
posted @ 2020-06-17 16:31 TFLSNOI 阅读(200) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 17 下一页