LOJ
肥仔甜甜
学习日记,欢迎评论。
展开
-
LOJ10002 喷水装置(贪心)
数模校赛结束,开始营业题目简单贪心 复杂度o(n)#include <iostream>#include <math.h>#include <algorithm>#define N 15500using namespace std;struct node{ double l, r;} a[N];bool vis[N];bool cm...原创 2019-06-23 00:59:50 · 208 阅读 · 0 评论 -
Error Curves 曲线求极值(三分)
LINK三分典型题没啥好说,注意精度!精确到小数点后4位,天真的我用l+1e-5<r一直没过//三分 没啥好说 注意精度 // https://loj.ac/problem/10013#include<iostream>#include <stdio.h>#include <math.h>#define INF 0x3f3f3f3fusi...原创 2019-06-22 11:43:51 · 542 阅读 · 0 评论 -
LOJ#10001. 「一本通 1.1 例 2」种树(贪心)
思路:右端点从小到大遍历,靠右种树。卡在这个循环for (int k = a[i].r; k >= a[i].l && cnt>0; k–)…&&cnt>0 ✔…&&cnt❌// https://loj.ac/problem/10001#include <bits/stdc++.h>#define N 500...原创 2019-06-23 01:55:45 · 201 阅读 · 0 评论