摘要: #include<bits/stdc++.h> // #include<iostream> // #include<stdio.h> // #include<iomanip> // #include<stack> // #include<queue> // #include<algorithm> // #include<cstring> // #include<map> // #include<v 阅读全文
posted @ 2019-10-12 23:52 cherish__lin 阅读(118) 评论(0) 推荐(0) 编辑
摘要: Marge is already preparing for Christmas and bought a beautiful tree, decorated with shiny ornaments. Her Christmas tree can be represented as a compl 阅读全文
posted @ 2019-09-27 11:21 cherish__lin 阅读(183) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://codeforces.com/gym/100553/attachments/download/2885/20142015-acmicpc-northeastern-european-regional-contest-neerc-14-en.pdf 首先bitset用法链接:h 阅读全文
posted @ 2019-09-26 11:17 cherish__lin 阅读(226) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://codeforces.com/gym/101550/attachments 总的来说就是要: 极大值卖出,极小值买入, 再加上端点时的特判. 还有就是会有连续几天股票价格相同的情况,这里就是判断的时候是严格的大于小于号的功劳了 首先手里肯定是没有股票的, 尝试买入第一天的股票 阅读全文
posted @ 2019-09-19 11:00 cherish__lin 阅读(179) 评论(0) 推荐(0) 编辑
摘要: Mr. Potato Head has been promoted and now is a math professor at the UNAL. For his first course he is willing to teach hard subjects, so at the moment 阅读全文
posted @ 2019-09-13 15:14 cherish__lin 阅读(507) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5531 Problem Description Archaeologists find ruins of Ancient ACM Civilization, and they want to rebuil 阅读全文
posted @ 2019-09-10 21:56 cherish__lin 阅读(208) 评论(0) 推荐(0) 编辑
摘要: You are given a directed graph with 𝑛n vertices and 𝑚m directed edges without self-loops or multiple edges. Let's denote the 𝑘k-coloring of a digra 阅读全文
posted @ 2019-09-06 21:21 cherish__lin 阅读(341) 评论(0) 推荐(1) 编辑
摘要: Almost everyone likes kebabs nowadays (Here a kebab means pieces of meat grilled on a long thin stick). Have you, however, considered about the hardsh 阅读全文
posted @ 2019-08-22 10:38 cherish__lin 阅读(187) 评论(0) 推荐(0) 编辑
摘要: //高斯消元 时间复杂度O(n^3) 使用浮点数计算 #include #include #include using namespace std; const double eps=1e-8; const int maxn=101; double a[maxn][maxn]; bool l[maxn]; double ans[maxn]; int n,m; int t; void prin... 阅读全文
posted @ 2019-08-20 16:55 cherish__lin 阅读(418) 评论(0) 推荐(0) 编辑
摘要: Given a connected undirected graph, tell if its minimum spanning tree is unique. Definition 1 (Spanning Tree): Consider a connected, undirected graph 阅读全文
posted @ 2019-08-10 20:27 cherish__lin 阅读(641) 评论(0) 推荐(0) 编辑