上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 18 下一页
摘要: https://www.luogu.com.cn/problem/P1618 1 #include<bits/stdc++.h> 2 using namespace std; 3 int a, b, c; 4 int dic[10]; //用于判断是否1-9每个数都出现过 5 bool check1 阅读全文
posted @ 2020-07-14 17:09 TFLSNOI 阅读(217) 评论(0) 推荐(0)
摘要: https://www.luogu.com.cn/problem/P2089 1 #include<bits/stdc++.h> 2 using namespace std; 3 int n, cnt=0, ans[60000][10]; 4 //最多情况是3^10= 59049,所以开60000二 阅读全文
posted @ 2020-07-14 14:53 TFLSNOI 阅读(176) 评论(0) 推荐(0)
摘要: 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 阅读(388) 评论(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 阅读(882) 评论(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 阅读(327) 评论(0) 推荐(0)
摘要: 【题目描述】 假期时,TFLSOIers最喜欢的事情是到学校学习C++编程,糟糕的是学习编程的机房在11层,世界上最痛苦的事莫过于爬楼梯。假设爬到11层共有N个台阶,TFLSOIers从下往上爬楼梯,一步可以跨一级台阶,也可以跨两级台阶。问:他们爬到第N个台阶有多少种走法? 【输入格式】 一行一个整 阅读全文
posted @ 2020-07-10 07:41 TFLSNOI 阅读(729) 评论(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 阅读(175) 评论(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 阅读(165) 评论(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 阅读(288) 评论(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 阅读(263) 评论(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 阅读(329) 评论(0) 推荐(0)
摘要: https://ac.nowcoder.com/acm/problem/205055 二分答案+贪心 思路:想要二分的找到最小需要看的天数的话,其实就应该要求出在一定天数间能获得的最大知识点。贪心策略就是优先看知识点数高的书。所以我们可以先将原序列按知识点从大到小排列,再按照看书天数将书分为不同集合 阅读全文
posted @ 2020-06-28 08:57 TFLSNOI 阅读(194) 评论(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 阅读(250) 评论(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 阅读(286) 评论(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 阅读(312) 评论(0) 推荐(0)
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 18 下一页