Loading

随笔分类 -  刷题笔记----------

上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 25 下一页
摘要:题目链接: https://ac.nowcoder.com/acm/contest/999/B 思路:(见图中解释) AC代码: #include<bits/stdc++.h> using namespace std; typedef long long ll; const int N = 1000 阅读全文
posted @ 2020-08-07 16:36 RioTian 阅读(129) 评论(0) 推荐(1)
摘要:A题:a^b https://ac.nowcoder.com/acm/contest/996/A 题目描述 求 a 的 b 次方对 p 取模的值,其中 0 ⇐ a,b,p ⇐ 10^9 输入描述: 三个用空格隔开的整数a,b和p。 输出描述: 一个整数,表示a^b mod p的值。 实例: 输入: 阅读全文
posted @ 2020-08-07 13:05 RioTian 阅读(558) 评论(0) 推荐(0)
摘要:B题 Telephone Lines https://ac.nowcoder.com/acm/contest/1055/B 中文题面:https://www.luogu.com.cn/problem/P1948 分层图最短路 #include <bits/stdc++.h> using namesp 阅读全文
posted @ 2020-08-05 15:51 RioTian 阅读(236) 评论(0) 推荐(1)
该文被密码保护。
posted @ 2020-08-05 14:28 RioTian 阅读(15) 评论(0) 推荐(1)
摘要:题目链接:http://codeforces.com/problemset/problem/1191/B 题意:类似于麻将,三个一样花色一样数字的,或者三个同花顺就赢了,新抽的能当任何类型,问至少几个。 思路:分类判断即可。 AC代码: #include<bits/stdc++.h> using n 阅读全文
posted @ 2020-08-04 09:49 RioTian 阅读(178) 评论(1) 推荐(1)
该文被密码保护。
posted @ 2020-08-03 11:57 RioTian 阅读(12) 评论(0) 推荐(0)
摘要:A题 楼兰图腾 链接:https://ac.nowcoder.com/acm/contest/1032/A 树状数组 + 逆序对 #include<bits/stdc++.h> using namespace std; #define lowbit(x) (x & -x) typedef long 阅读全文
posted @ 2020-08-02 16:27 RioTian 阅读(197) 评论(1) 推荐(0)
摘要:A题 程序自动分析 题目链接:https://ac.nowcoder.com/acm/contest/1031/A 题目描述 在实现程序自动分析的过程中,常常需要判定一些约束条件是否能被同时满足。 考虑一个约束满足问题的简化版本:假设 𝑥1, 𝑥2, 𝑥3, ⋯ 代表程序中出现的变量,给定 � 阅读全文
posted @ 2020-08-02 11:42 RioTian 阅读(330) 评论(0) 推荐(1)
摘要:https://codeforces.com/problemset/problem/466/C 解题说明:此题是一道数学题,若平分分成若干种情况,应当整体(sum)考虑,对sum/3进行分析。它是区分3段的标准。 所以当部分和tmp=sum/3,部分统计加一。 当 tmp==sum*2/3,则全部统 阅读全文
posted @ 2020-08-02 10:56 RioTian 阅读(155) 评论(0) 推荐(0)
摘要:http://poj.org/problem?id=1456 题意:给你 N 件不同的商品,每件商品最多可以买一次。每件物品对应两个值 pi di pi 表示物品的价值,di 表示可以买的最迟时间(也就是第一天到第 di 天都可以买这件物品) 规定:每天最多可以买一件物品,问你可以得到的最大价值。 阅读全文
posted @ 2020-08-01 16:53 RioTian 阅读(134) 评论(0) 推荐(1)
摘要:https://codeforces.com/problemset/problem/711/A 正则表达式基本应用 #include<bits/stdc++.h> using namespace std; int n, i; string s, t; int main() { //freopen(" 阅读全文
posted @ 2020-08-01 11:49 RioTian 阅读(187) 评论(0) 推荐(0)
摘要:https://vjudge.net/problem/HDU-4027#author=SUDA2019 题意 输入n个数 然后有两种操作 输入0时将给定区间所有数都变为自己的开方 输入1输出给定区间所有数的和 虽然是区间更新 但每个点更新的不一样 因此只能对单点进行更新 其实一个点最多被更新7次 $ 阅读全文
posted @ 2020-08-01 09:58 RioTian 阅读(98) 评论(0) 推荐(1)
摘要:Mayor's posters https://vjudge.net/problem/POJ-2528#author=szdytom 线段树 + 离散化 讲解:https://blog.csdn.net/qq_35802619/article/details/98326267 #include<io 阅读全文
posted @ 2020-07-31 15:53 RioTian 阅读(209) 评论(0) 推荐(0)
摘要:敌兵布阵 HDU - 1166 多组输入,注意清除tr数组 维护一个前缀数组,耗时有点大 #include <cstdio> #include <cstring> using namespace std; const int maxn = 5e4 + 5; int t, n; int sum[max 阅读全文
posted @ 2020-07-31 10:01 RioTian 阅读(232) 评论(0) 推荐(0)
摘要:During the Warring States Period of ancient China(476 BC to 221 BC), there were seven kingdoms in China they were Qi, Chu, Yan, Han, Zhao, Wei and Qin 阅读全文
posted @ 2020-07-30 11:06 RioTian 阅读(234) 评论(0) 推荐(1)
摘要:CF 1374A. Required Remainder You are given three integers x,y and n. Your task is to find the maximum integer k such that 0≤k≤n that kmodx=y, where mo 阅读全文
posted @ 2020-07-29 08:31 RioTian 阅读(175) 评论(0) 推荐(1)
摘要:kuangbin专题链接:https://vjudge.net/article/752 kuangbin专题十二 基础DP1 题解+总结:https://www.cnblogs.com/RioTian/p/13110438.html 最小生成算法 介绍 和 模板 次最小生成树:介绍及模板 总结: 文 阅读全文
posted @ 2020-07-27 11:09 RioTian 阅读(896) 评论(0) 推荐(1)
摘要:这一次的Div.2 大多数学思维。。 A. Park Lightingtime https://codeforces.com/contest/1358/problem/A 题意:给一个n,m为边的矩形,问最少的灯使得整个矩形照亮 思路:n * m 为总区域数一个灯最多能照亮两块区域,贪心做:每次都取 阅读全文
posted @ 2020-07-26 15:26 RioTian 阅读(122) 评论(0) 推荐(0)

上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 25 下一页