ACM
dukig
尽人事,知天命。
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
17级第一次周赛题解
链接https://vjudge.net/contest/292686#overview A. 单词对齐 思路:用stringstream存储所有单词后,再用一个int数组存储每一个位置单词的最大数量以及用一个vector存储单词。 #include<iostream> #include<algorithm> #include<cstdio> #incl...原创 2019-04-04 20:43:42 · 212 阅读 · 0 评论 -
17青岛区域赛
链接:https://nanti.jisuanke.com/acm?kw=ACM-ICPC%202017%20Asia%20Qingdao B(模拟) 像#一样3个一个字母就输出那个字母 #include<iostream> #include<algorithm> #include<cstdio> #include<cstring> usin...原创 2019-04-28 12:00:41 · 320 阅读 · 0 评论 -
2013 Asia Regional Changchun
A 非常简单的签到题 #include<iostream> #include<algorithm> #include<cstdio> #include<cstring> using namespace std; int main(){ int t,n,m; string a; scanf("%d",&t); while(t--...原创 2019-04-28 12:00:34 · 236 阅读 · 0 评论 -
2018多校 第一场
A 给出一个数n,找到3个数a,b,c,a,b,c均能整除n,使得n = a+b+c且a*b*c最大,找不到a b c就输出-1 令 x = n/a y = n/b z = n/c 公式同时除以n--->1 = 1/x+1/y+1/z -- >3个解 (3,3,3)(2,4,4),(2,3,6) 当n%3 == 0--> x*y*z = n^3/27 n%4 == 0 -...原创 2019-04-27 15:09:34 · 281 阅读 · 0 评论 -
UVA-11827 (输入坑)
链接:https://cn.vjudge.net/contest/276155#problem/V 输入可以学学 #include <iostream> #include <cstdlib> #include <cstdio> using namespace std; int data[101]; int gcd(int a, int b) {...原创 2019-04-26 20:42:46 · 432 阅读 · 0 评论 -
2017 香港
E(最大化最小值) 模板题 #include <cstdio> #include <iostream> #include <algorithm> #include <cstring> #include <cmath> #define INF 0x3f3f3f3f using namespace std; const int MAXN...原创 2019-04-28 12:00:54 · 354 阅读 · 0 评论 -
湘潭ccpc2018
链接:https://cn.vjudge.net/contest/296332#overview A. 阅读理解题。找出引用数大于h的至少有h篇的论文那个最大的h数。(我晕了) 比如 第二个样例 2 1(下标0)2(下标1) 3(下标2) 其中下标表示引用数,而ai表示论文的数论,3(下标2)表示引用了2页的论文有3篇。 这里引用数大于2的为3篇,引用数大于1的为5篇,引用数大于0的...原创 2019-04-21 15:35:07 · 319 阅读 · 0 评论 -
牛客寒假3部分
链接:https://ac.nowcoder.com/acm/contest/329#question I. 怎样都行,要么把它变成全1,要么把它变为全0. #include<iostream> #include<algorithm> #include<cstdio> #include<cstring> using namespace ...原创 2019-04-21 14:46:47 · 161 阅读 · 0 评论 -
小a的回文串 -- (最长回文字串模板)
链接:https://ac.nowcoder.com/acm/contest/549/B #include<bits/stdc++.h> using namespace std; const int maxn = 1e6 + 100; int cnt, len, ans = 0; char s[maxn], ss[maxn * 2]; int p[maxn * 2]; vo...原创 2019-04-13 10:22:11 · 349 阅读 · 0 评论 -
poj2566 (尺取法)
链接:https://cn.vjudge.net/problem/POJ-2566 #include<iostream> #include<algorithm> #include<cstdio> #include<cstring> #include<cmath> using namespace std; typedef sz 1000...原创 2019-04-09 19:00:39 · 451 阅读 · 0 评论 -
处女座的期末考试(贪心)
链接:https://ac.nowcoder.com/acm/contest/327/J 每次都选最先准备的科目复习就行。 #include<iostream> #include<algorithm> #include<cstdio> #include<cstring> using namespace std; typedef long lon...原创 2019-04-09 16:34:32 · 233 阅读 · 0 评论 -
处女座的砝码(思维 找规律)
链接:https://ac.nowcoder.com/acm/contest/327/C 砝码每次都选3的k次放。。 #include<iostream> #include<algorithm> #include<cstdio> #include<cstring> using namespace std; int main(){ long ...原创 2019-04-09 14:46:25 · 198 阅读 · 0 评论 -
小a与cf(模拟)
链接:https://ac.nowcoder.com/acm/contest/327/B 这类题需要多练,写了一个小时竟然只过了6.67%。 我的错误代码: #include<iostream> #include<algorithm> #include<cstdio> #include<cstring> #include<map>...原创 2019-04-08 13:19:02 · 369 阅读 · 0 评论 -
hdoj2795(线段树)
这题要用scanf,不然runtime error #include<iostream> #include<algorithm> #include<cstdio> #include<cstring> using namespace std; typedef long long ll; const int sz = 200000; int sum...原创 2019-04-11 13:18:15 · 251 阅读 · 0 评论 -
hdoj6187(最大生成树)
题意:摧毁多少个墙能让国王能到达任何一个坐标点 前面题目给的坐标没用,只用用后面的数据,将Kruskal的cmp判断小于号改为大于号就是最大生成树。 #include<iostream> #include<algorithm> #include<cstdio> #include<cstring> using namespace std; con...原创 2019-04-11 11:31:08 · 162 阅读 · 0 评论 -
Codeforces Round #550 (Div. 3) F
链接:http://codeforces.com/contest/1144/problem/F 题意:给定一张图,为其中的边标注方向,问能否有策略使得连续的2条边方向不相同。 解法:标准的图着色。 #include<iostream> #include<algorithm> #include<cstdio> #include<cstring>...原创 2019-04-01 19:34:46 · 128 阅读 · 0 评论 -
poj1990 (树状数组)
题意:给定n个猪的x坐标和它们的音量,2头猪之间的交谈声=他们之间的距离*他们间比较大的音量,求n头猪两两交谈的总音量。 把n头猪根据音量从小到大排后,用线段数组记录下他们的距离与猪的数量。 #include<iostream> #include<algorithm> #include<cstdio> #include<cstring> usi...原创 2019-04-10 15:11:28 · 316 阅读 · 0 评论 -
2017 沈阳区域赛
F (思维) 题目大意:有n个兔子排成一列在河边玩游戏,每个兔子占有一个不同的数字,游戏规则是最外边的兔子,可以在其他任意两只兔子之间移动,求最多可以移动的次数,(一个兔子一个坑)。 纯思维 签到题 #include<iostream> #include<algorithm> #include<cstdio> #include<cstring>...原创 2019-04-28 12:01:04 · 465 阅读 · 0 评论
分享