ICode9

精准搜索请尝试: 精确搜索
  • Graduation Gym - 102307G (思维+拓扑排序)2019-09-21 16:02:10

    这个题我看反了树。。 优先队列也写反了 逻辑应该是本来优先队列就是大根堆然后我的小于号应该按照d的大小进行重定义(不知道为什么一开始跑出结果来了clion害我) 就是对森林进行拓扑排序然后找拥有最大子树的节点然后删除 #include<iostream> #include<cstdio> #include<vect

  • Common Subsequence Gym - 102307C 公共序列2019-09-14 12:01:21

    2019 ICPC Universidad Nacional de Colombia Programming Contest C D J   C. Common Subsequence 题意:给出长度为n两个串,求两个串的最长公共子序列len,如果len>=0.99*n,两个串就是亲兄弟否则不是。 解法:朴素的求LCS的时间复杂度是O(nm),这题肯定超时。正解不容易想,要注意到0.99

  • codeforces gym #101161F-Dictionary Game(字典树+树上删边游戏)2019-09-11 19:02:38

      题目链接: http://codeforces.com/gym/101161/attachments 题意: 给一个可以变化的字典树 在字典树上删边 如果某条边和根节点不连通那么这条边也删除 谁没得删就输了 数据范围: $1\leq n \leq 100000$ $1\leq q \leq 100000$ $1\leq |s| \leq 40$ 分析:    ac代码:   #include<

  • Working Time Gym - 101853F2019-09-03 17:39:38

     https://cn.vjudge.net/problem/Gym-101853F #include <iostream> #include <cstring> #include <queue> #include <vector> #include <algorithm> #include <cstdio> #include <set> #include <map> #include <stack&g

  • Continuous Intervals Gym - 102222L(2018宁夏邀请赛暨2019银川icpc网络预选赛)2019-08-31 20:02:10

    Lamis is a smart girl. She is interested in problems about sequences and their intervals. Here she shows you a sequence of length nn with positive integers, denoted by a1,a2,a3,⋯,ana1,a2,a3,⋯,an. She is amazed at those intervals, which is a consecuti

  • Buildings Gym - 101873B2019-08-31 20:01:23

    https://cn.vjudge.net/problem/Gym-101873B  #include <iostream> #include <cstring> #include <queue> #include <vector> #include <algorithm> #include <cstdio> #include <set> #include <map> #include <stack&g

  • Gym - 101845E (图形转换思维)2019-08-30 20:01:59

    题意:给你个边长为n(1 <= n <= 50)的下图这种三角形,图形所有点构成集合。找多少对a,b满足条件,条件为:ab两点之间还有其他点。    题解:刚开始以为直接找规律就行,wa了两次发现可能会有斜着的。后来又想暴力跑一下就行了,但是坐标是double的怎么跑?然后发现转化成直的就行了。至于为什么

  • Gym 10102B 贪心2019-08-25 10:02:00

    原题连接:http://codeforces.com/gym/101102/problem/B 题意:用火柴棍摆数字,保证位数不变的情况下,相同数量的火柴棍,使数值尽量大。 思路:先建立一个数组,对应每一个数字需要的火柴棍数量。外层循环枚举每一位,内层循环选数字。每一位数字最少用2根火柴棍,最多用7根,所以剩下几位,就用位数

  • A - Jumping Buildings Gym - 102302A(单调队列,找这个数右边第一个比他大的数)2019-08-19 21:35:33

    Bob is developing a new game called jumping Lario. In this game the main protagonist, Lario, has to jump on top of buildings until he reaches the end of the level. The level is composed of N buildings of possibly different heights. The building where L

  • Gym-100923H-Por Costel and the Match(带权并查集)2019-08-18 15:57:28

    链接: https://vjudge.net/problem/Gym-100923H 题意: Oberyn Martell and Gregor Clegane are dueling in a trial by combat. The fight is extremely important, as the life of Tyrion Lannister is on the line. Oberyn and Gregor are measuring their skill in combat the

  • Gym-100923L-Por Costel and the Semipalindromes(进制转换,数学)2019-08-17 23:51:14

    链接: https://vjudge.net/problem/Gym-100923L 题意: Por Costel the pig, our programmer in-training, has recently returned from the Petrozaporksk training camp. There, he learned a lot of things: how to boil a cob, how to scratch his belly using his keyboard, e

  • Security Guards (Gym - 101954B)( bfs + 打表 )2019-08-15 23:01:25

    题意及思路 题目主要是讲先给出所有guard的位置,再给出所有incidents的位置,求出guard到达每个incident处最小的steps,其中guard每次可以向四周8个方向移动。 思路:对于每个guard使用bfs遍历它周围的点,算出相应的点到它的距离。 AC代码 #include<bits/stdc++.h> using namespace std;

  • Loppinha, the boy who likes sopinha Gym - 101875E (搜索+dp)2019-08-05 20:08:06

    Loppinha loves to go to the gym with his friends. He takes his training sessions very seriously, and he always follows his schedule very strictly. He just created a new plan where he has set exactly what he is going to do at every single one of the N minu

  • python3.6安装open AI gym环境(windows)2019-08-03 15:50:29

    windows下安装gym环境 ①pip install gym ②安装atari环境   pip install --no-index -f https://github.com/Kojoley/atari-py/releases atari_py

  • World Cup Gym - 101194L2019-07-27 16:03:40

    Input file: Standard Input Output file: Standard Ouptut Time limit: 1 second 这是2016 ACM-ICPC Asia China-Final里面的一道水题,当时训练赛时做这道题思路不对,就没做出来。。 题目大意:四支球队进行循环赛,每两支队之间只进行一次比赛,一共进行6场,对于非平局:赢的队伍得3分,输的队

  • SDU暑假排位第一场 (Gym - 100889)2019-07-25 10:02:42

    啊今天有点挂机啊 D题和队友暴力后发现一组数据跑得飞快 然后遇上1e5组数据就没了..... 然后我疯狂优化暴力 然后去世了 最后半小时F也没写出来 主要还是最后有点慌并且没有考虑清楚 导致情况越写越多最后写了23个if 这肯定是完蛋了啊 A:签到 #include <bits/stdc++.h>#define in

  • K - Six Sides Gym - 101291K (概率题)2019-07-23 14:41:08

    Download 题目请点链接 #include <iostream> #include <string.h> #include <stdio.h> using namespace std; int main() { int i,j,k,g; double t=0.00000; int n[10],m[10]; for(i=1; i<=6; i++) { cin >> n[i]; }

  • E - Contest Score Gym - 101291E (优先队列)2019-07-23 14:39:31

    Download #include <iostream> #include <algorithm> #include <queue> using namespace std; int a,k; int n[310]; long long int t=0,ans=0; priority_queue<int,vector<int>,greater<int>>q; int main() { t=0; ans=0;

  • D - Cameras Gym - 101291D (坑)2019-07-23 14:38:44

    Download 这个方法卡在了42test; #include <iostream> #include <string.h> using namespace std; int main() { int a,b,c,i,j,sum=0,d,k,g; int n[100010]; cin >> a >> b >> c; memset(n,0,sizeof(n)); for(i=1; i<=b; i+

  • G - Gravity Gym - 101291G (字符的换位)2019-07-23 14:37:44

    Download #include <iostream> #include <string.h> #include <stdio.h> #include <algorithm> using namespace std; int main() { char s[510][510]; int a,b; cin >> a >> b; for(int i=1; i<=a; i++) {

  • Codeforces Gym 100989F(STL: map)2019-07-20 19:04:06

    F. Mission in Amman (A) time limit per test 1.0 s memory limit per test 256 MB input standard input output standard output You must have heard about Agent Mahone! Dr. Ibrahim hired him to catch the cheaters in the Algorithms course. N students cheated an

  • codeforces gym 102268 300iq round2019-07-11 21:50:58

    暂时只能写签到题,别的题解之后补 A.Angle Beats B.Best Subsequence 有点有趣的二分 显然二分之后就是找到一个长度恰好为k的合法环了 先证明一个引理,如果可以找到一个长度大于k的环一定可以找到一个长度等于k的环 固定头尾不动之后就可以使用归纳法证明一个长度大于3的环都可以删

  • Gym - 101667E How Many to Be Happy?(最小生成树,最大流最小割)2019-07-09 16:04:50

    题目链接:Gym - 101667E How Many to Be Happy? 题意: 给出一含有n个结点和m条边的图G,定义该图中的最小生成树(MST)含有的边为happy,而不在MST中的边为unhappy,对于unhappy的边e,删除最少的边数H(e)使得其变为happy,求H(e)之和。 分析: 由MST的性质可知,对于任意一条不在MST中的边e,

  • Gym 101464C - 计算几何+二分(uva1463)2019-07-01 23:43:52

    网络赛的A题。不是很难,但是我觉得对代码能力的要求还是挺高的。 注意模块化。 因为是浮点数,所以二分用的很多很多。 参考 https://blog.csdn.net/njupt_lyy/article/details/81256538?utm_source=blogxgwz4 对半径二分,这样我们只需要判断能不能放的下这个圆。这时,通过给定的半径,对

  • OpenAI Gym 是一个优秀开发和比较强化学习算法的工具2019-06-30 11:26:49

    OpenAI Gym 是一个优秀开发和比较强化学习算法的工具. gym的核心接口是Env方法:     reset(self):重置环境的状态,返回观察。     step(self, action):推进一个时间步长,返回observation,reward,done,info     render(self, mode=’human’, close=False):重绘环境的一帧 OpenAI G

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有