水库
Orion233
这个作者很懒,什么都没留下…
展开
-
#2017 Multi-University Training Contest - Team 1 1011
# hdu 6043 KazaQ’s Socks题意:“劝退赛第一场”签到题 (\iwi/) 。分析:找规律就可以看出除去前 n 天,后面就是(n-1)天一个循环,权值最大的两双交替,其他顺序排放就好。代码如下:#include <bitset> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #inc原创 2017-07-26 09:49:26 · 305 阅读 · 0 评论 -
字符串的下划线命名和驼峰命名转换
字符串的下划线命名和驼峰命名转换 java /** * 将驼峰式命名的字符串转换为下划线大写方式。如果转换前的驼峰式命名的字符串为空,则返回空字符串。 * 例如:HelloWorld->HELLO_WORLD * @param name 转换前的驼峰式命名的字符串 * @return 转换后下划线大写方式命名的字符串 */ publicstatic String und原创 2018-01-10 11:17:14 · 1522 阅读 · 0 评论 -
CSP认证考试201712-B 游戏
代码如下: #pragma comment(linker, "/STACK:1024000000,1024000000") #include #include #include #include #include #include #include #include #include #include #include #include #include #includ原创 2018-01-14 12:07:59 · 1467 阅读 · 0 评论 -
HihoCoder - 1305 经典问题 区间覆盖相减
题目:C - 经典问题 You are given two interval collections A and B. Collection A has N intervals [ A1, A2 ], [ A3, A4 ], ..., [ A2N-1, A2N ] and collection B has M intervals [ B1, B2 ], [ B3, B4 ], ..., [ B2M-原创 2017-10-16 10:25:03 · 461 阅读 · 0 评论 -
Codeforces E. Field of Wonders
题意:猜单词游戏,每次可以报一个字母(a~z且还未在已知字符串中出现),如果字符串中有这个字母,则将此串中所有字母显现;现在参赛者已知一些字符串(必有正确答案),问可以说出几个字母,是的至少有一个字母能够被显现出来。分析: 1、筛选待选字符串,将与” * “对应并且该位置字母在已知串中出现过,删除(原串a*cd,待选aacd);不是” * “的位置对应的字母不相同的,删除(原串aadc * ,待选原创 2017-10-24 16:02:28 · 282 阅读 · 0 评论 -
Oh Your Royal Greediness! UVA - 11776
题意&分析 :地主派人去监工,每个农民都以一个劳作的时间段,一位监工只能监管一个人,问至少要多少个监工,这个问题就是求有交集的最大区间数。 区别于贪心的三种区间问题。代码如下://#pragma comment(linker, "/STACK:1024000000,1024000000") #include <algorithm> #include <bitset> #include <cmath原创 2017-09-19 19:41:54 · 367 阅读 · 0 评论 -
Codeforces Round#433 B. Maxim Buys an Apartment
B. Maxim Buys an Apartment 题目传送门写得一手毒代码,我看还能掉多少分。#include <bits/stdc++.h> #define INF 0x3f3f3f3f #define TEST cout<<"stop here"<<endl using namespace std; typedef long long ll; const ll mod = 1e9 + 7;原创 2017-09-07 18:36:08 · 220 阅读 · 0 评论 -
Codeforces Round#432 B. Arpa and an exam about geometry
题目如下:B. Arpa and an exam about geometrytime limit per test2 seconds memory limit per test256 megabytes Arpa is taking a geometry exam. Here is the last problem of the exam.You are given three points a,原创 2017-09-05 19:51:16 · 211 阅读 · 0 评论 -
#2017 Multi-University Training Contest 2 1001
Is Derek lying? 题意: 给出两人的答案,由你判断 Derek 提供的分数是否真实。分析: (1)两人的分数差不会大于两人不相同的题目所占分数;(2)两人分数和加上不一样的题目的分数不会比两张卷子总分2 * n 大。如果上面两条有一条不符合,那么就有假。代码如下:#include <bits/stdc++.h #define INF 0x3f3f3f3f using namesp原创 2017-07-28 16:58:20 · 169 阅读 · 0 评论 -
Codeforces Round#429 B-Godesend
题意&分析: 题目传送门 First选手可以取走数组中一段和为奇数的子串,Second取走的是和为偶数的子串,取走后剩余部分合并成新的数组。谁不能再取则输。若全部和为奇数,First直接获胜。 若为偶数,只需要判断数组中是否有奇数,若有,则First取走后剩余部分和任为奇数,取走一段偶数部分的和,剩余依然是奇数。代码如下:#include <bits/stdc++.h> #define INF原创 2017-08-19 12:02:46 · 180 阅读 · 0 评论 -
#HDU 6098 Inversion
Inversion题意&分析: 给出数组A,求; 即 j%i !=0 的时候满足,要求最大的那么递减排序,并用结构体存下序号以及数组 A;然后暴力即可。代码如下:#include <bits/stdc++.h> #define INF 0x3f3f3f3f using namespace std; typedef long long ll; const ll mod = 1e9 + 7;stru原创 2017-08-12 09:47:45 · 191 阅读 · 0 评论 -
#2017 Multi-University Training Contest - Team 1 1001
hdu 6033 Add More Zero 分析: 代码如下:int main(){ std::ios::sync_with_stdio(false); std::cin.tie(0); int k=0,m; while (scanf("%d",&m )!=EOF) { int ans = m*log10(2);原创 2017-07-26 10:01:23 · 190 阅读 · 0 评论 -
第十三次csp 1、2题
1 //13CSP A #include <iostream> #include <string> #include <algorithm> using namespace std; int main(){ int jump; int score = 0,cnt = 0,pre = 0; while(true){ ...原创 2018-04-10 08:32:19 · 195 阅读 · 0 评论