Codeforces Round #287 (Div. 2) 题解

OpenStack 8 节点生产级高可用(HA)集群实施文档 本文详细介绍了生产级高可用OpenStack集群的架构设计与实施方案。通过采用3节点控制集群(HAProxy+Keepalived)、2节点计算资源池和3节点Ceph分布式存储,实现了控制平面、计算资源和存储系统三个层面的高可用。方案重点阐述了VIP漂移、MariaDB Galera集群、RabbitMQ镜像队列等关键组件的配置方法,并提供了完整的部署流程和故障验证方案。该架构确保任意单节点故障不会影响平台整体可用性,满足生产环境对稳定性、扩展性和可维护性的要求,为构建无单点故障的OpenStack生产环境 阅读详情
A. Amr and Music
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

Amr is a young coder who likes music a lot. He always wanted to learn how to play music but he was busy coding so he got an idea.

Amr has n instruments, it takes ai days to learn i-th instrument. Being busy, Amr dedicated k days to learn how to play the maximum possible number of instruments.

Amr asked for your help to distribute his free days between instruments so that he can achieve his goal.

Input

The first line contains two numbers n, k (1 ≤ n ≤ 100, 0 ≤ k ≤ 10 000), the number of instruments and number of days respectively.

The second line contains n integers ai (1 ≤ ai ≤ 100), representing number of days required to learn the i-th instrument.

Output

In the first line output one integer m representing the maximum number of instruments Amr can learn.

In the second line output m space-separated integers: the indices of instruments to be learnt. You may output indices in any order.

if there are multiple optimal solutions output any. It is not necessary to use all days for studying.

Sample test(s)
Input
4 10
4 3 1 2
Output
4
1 2 3 4
Input
5 6
4 3 1 1 2
Output
3
1 3 4
Input
1 3
4
Output
0
Note

In the first test Amr can learn all 4 instruments.

In the second test other possible solutions are: {2, 3, 5} or {3, 4, 5}.

In the third test Amr doesn't have enough time to learn the only presented instrument.


A:水题,排个序,水题贪心吧算是


/*************************************************************************
    > File Name: cf287a.cpp
    > Author: ALex
    > Mail: 405045132@qq.com 
    > Created Time: 2015年01月23日 星期五 23时49分38秒
 ************************************************************************/

#include <map>
#include <set>
#include <queue>
#include <stack>
#include <vector>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <algorithm>

using namespace std;

struct node
{
	int day;
	int d;
}aaa[110];

int cmp (node a, node b)
{
	return a.day < b.day;
}

int main ()
{
	int n, k;
	while (~scanf("%d%d", &n, &k))
	{
		for (int i = 1; i <= n; ++i)
		{
			scanf("%d", &aaa[i].day);
			aaa[i].d = i;
		}
		sort (aaa+ 1, aaa + n + 1, cmp);
		int cnt = 0;
		for (int i = 1; i <= n; ++i)
		{
			if (k - aaa[i].day >= 0)
			{
				k -= aaa[i].day;
				cnt++;
			}
			else
			{
				break;
			}
		}
		printf("%d\n", cnt);
		if (cnt == 0)
		{
			continue;
		}
		printf("%d", aaa[1].d);
		for (int i = 2; i <= cnt; ++i)
		{
			printf(" %d", aaa[i].d);
		}
		printf("\n");
	}
	return 0;
}

B. Amr and Pins
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

Amr loves Geometry. One day he came up with a very interesting problem.

Amr has a circle of radius r and center in point (x, y). He wants the circle center to be in new position (x', y').

In one step Amr can put a pin to the border of the circle in a certain point, then rotate the circle around that pin by any angle and finally remove the pin.

Help Amr to achieve his goal in minimum number of steps.

Input

Input consists of 5 space-separated integers r, x, y, x' y' (1 ≤ r ≤ 105,  - 105 ≤ x, y, x', y' ≤ 105), circle radius, coordinates of original center of the circle and coordinates of destination center of the circle respectively.

Output

Output a single integer — minimum number of steps required to move the center of the circle to the destination point.

Sample test(s)
Input
2 0 0 0 4
Output
1
Input
1 1 1 4 4
Output
3
Input
4 5 6 5 6
Output
0
Note

In the first sample test the optimal way is to put a pin at point (0, 2) and rotate the circle by 180 degrees counter-clockwise (or clockwise, no matter).

水题,沿着连线翻转,次数一定最少,所以答案就是d / (2 * r),注意向上取整


/*************************************************************************
    > File Name: cf287b.cpp
    > Author: ALex
    > Mail: 405045132@qq.com 
    > Created Time: 2015年01月24日 星期六 00时05分53秒
 ************************************************************************/

#include <map>
#include <set>
#include <queue>
#include <stack>
#include <vector>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <algorithm>

using namespace std;

int main ()
{
	double r, x1, y1, x2, y2;
	while (~scanf("%lf%lf%lf%lf%lf", &r, &x1, &y1, &x2, &y2))
	{
		double d = (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2);
		d = sqrt (d);
		printf("%d\n", (int)ceil(d / (2 * r)));
	}
	return 0;
}

C. Guess Your Way Out!
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

Amr bought a new video game "Guess Your Way Out!". The goal of the game is to find an exit from the maze that looks like a perfect binary tree of height h. The player is initially standing at the root of the tree and the exit from the tree is located at some leaf node.

Let's index all the leaf nodes from the left to the right from 1 to 2h. The exit is located at some node n where 1 ≤ n ≤ 2h, the player doesn't know where the exit is so he has to guess his way out!

Amr follows simple algorithm to choose the path. Let's consider infinite command string "LRLRLRLRL..." (consisting of alternating characters 'L' and 'R'). Amr sequentially executes the characters of the string using following rules:

  • Character 'L' means "go to the left child of the current node";
  • Character 'R' means "go to the right child of the current node";
  • If the destination node is already visited, Amr skips current command, otherwise he moves to the destination node;
  • If Amr skipped two consecutive commands, he goes back to the parent of the current node before executing next command;
  • If he reached a leaf node that is not the exit, he returns to the parent of the current node;
  • If he reaches an exit, the game is finished.

Now Amr wonders, if he follows this algorithm, how many nodes he is going to visit before reaching the exit?

Input

Input consists of two integers h, n (1 ≤ h ≤ 50, 1 ≤ n ≤ 2h).

Output

Output a single integer representing the number of nodes (excluding the exit node) Amr is going to visit before reaching the exit by following this algorithm.

Sample test(s)
Input
1 2
Output
2
Input
2 3
Output
5
Input
3 6
Output
10
Input
10 1024
Output
2046
Note

A perfect binary tree of height h is a binary tree consisting of h + 1 levels. Level 0 consists of a single node called root, level h consists of 2h nodes called leaves. Each node that is not a leaf has exactly two children, left and right one.

Following picture illustrates the sample test number 3. Nodes are labeled according to the order of visit.

利用二进制思想,比如一个叶子节点二进制是0101.....,表示第一层往左走,第二层往右走,第三次往左.....

可以发现,如果相邻2个二进制位相异,那么多走了一个节点,如果相同,就多走了一颗子树,子树上节点数目也很好求(二叉树),于是我们只要对目标叶子节点的每一位进行访问,与上次走的方向比较,然后统计答案就可以了


/*************************************************************************
    > File Name: cf287c.cpp
    > Author: ALex
    > Mail: 405045132@qq.com 
    > Created Time: 2015年01月24日 星期六 00时21分39秒
 ************************************************************************/

#include <map>
#include <set>
#include <queue>
#include <stack>
#include <vector>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <algorithm>

using namespace std;

int main ()
{
	int h;
	long long n;
	while(~scanf("%d%I64d", &h, &n))
	{
		--n;
		long long ans = 0;
		int pre = 1;
		for (int i = 0; i < h; ++i)
		{
			int c;
			if (n & (1LL << (h - i - 1)))
			{
				c = 1;
			}
			else
			{
				c = 0;
			}
			if (c != ((pre + 1) & 1))
			{
				ans += (1LL << (h - i));
			}
			else
			{
				++ans;
			}
			pre = c;
		}
		printf("%I64d\n", ans);
	}
	return 0;
}

D. The Maths Lecture
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

Amr doesn't like Maths as he finds it really boring, so he usually sleeps in Maths lectures. But one day the teacher suspected that Amr is sleeping and asked him a question to make sure he wasn't.

First he gave Amr two positive integers n and k. Then he asked Amr, how many integer numbers x > 0 exist such that:

  • Decimal representation of x (without leading zeroes) consists of exactly n digits;
  • There exists some integer y > 0 such that:
    • ;
    • decimal representation of y is a suffix of decimal representation of x.

As the answer to this question may be pretty huge the teacher asked Amr to output only its remainder modulo a number m.

Can you help Amr escape this embarrassing situation?

Input

Input consists of three integers n, k, m (1 ≤ n ≤ 1000, 1 ≤ k ≤ 100, 1 ≤ m ≤ 109).

Output

Print the required number modulo m.

Sample test(s)
Input
1 2 1000
Output
4
Input
2 2 1000
Output
45
Input
5 3 1103
Output
590
Note

A suffix of a string S is a non-empty string that can be obtained by removing some number (possibly, zero) of first characters from S.

bin神教的,设dp[i][j][0] 表示后i位,对k取模为j,且还没出现过整除的情况的数目,dp[i][j][1]表示后i位,对k取模为j,且已经出现过整除的情况

最后统计即可


/*************************************************************************
    > File Name: cf287d.cpp
    > Author: ALex
    > Mail: 405045132@qq.com 
    > Created Time: 2015年01月24日 星期六 12时10分19秒
 ************************************************************************/

#include <map>
#include <set>
#include <queue>
#include <stack>
#include <vector>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <algorithm>

using namespace std;

long long dp[1010][110][2];
long long f[1010];

int main()
{
	int n, k, m;
	while (~scanf("%d%d%d", &n, &k, &m))
	{
		memset (dp, 0, sizeof(dp));
		f[0] = 1;
		for (int i = 1; i <= n; ++i)
		{
			f[i] = (f[i - 1] * 10) % k;
		}
		dp[0][0][0] = 1;
		for (int i = 1; i <= n; ++i)
		{
			for (int j = 0; j < k; ++j)
			{
				for (int x = 0; x < 10; ++x)
				{
					if (i == n && x == 0)
					{
						continue;
					}
					int t = (f[i - 1] * x % k + j) % k;
					for (int sta = 0; sta < 2; ++sta)
					{
						int s = sta;
						if (t == 0 && (x != 0))
						{
							s = 1;
						}
						dp[i][t][s] += dp[i - 1][j][sta];
						dp[i][t][s] %= m;
					}
				}
			}
		}
		int ans = 0;
		for (int i = 0; i < k; ++i)
		{
			ans += dp[n][i][1];
			ans %= m;
		}
		printf("%d\n", ans);
	}
	return 0;
}

E. Breaking Good
time limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

Breaking Good is a new video game which a lot of gamers want to have. There is a certain level in the game that is really difficult even for experienced gamers.

Walter William, the main character of the game, wants to join a gang called Los Hermanos (The Brothers). The gang controls the whole country which consists of n cities with m bidirectional roads connecting them. There is no road is connecting a city to itself and for any two cities there is at most one road between them. The country is connected, in the other words, it is possible to reach any city from any other city using the given roads.

The roads aren't all working. There are some roads which need some more work to be performed to be completely functioning.

The gang is going to rob a bank! The bank is located in city 1. As usual, the hardest part is to escape to their headquarters where the police can't get them. The gang's headquarters is in city n. To gain the gang's trust, Walter is in charge of this operation, so he came up with a smart plan.

First of all the path which they are going to use on their way back from city 1 to their headquarters n must be as short as possible, since it is important to finish operation as fast as possible.

Then, gang has to blow up all other roads in country that don't lay on this path, in order to prevent any police reinforcements. In case of non-working road, they don't have to blow up it as it is already malfunctional.

If the chosen path has some roads that doesn't work they'll have to repair those roads before the operation.

Walter discovered that there was a lot of paths that satisfied the condition of being shortest possible so he decided to choose among them a path that minimizes the total number of affected roads (both roads that have to be blown up and roads to be repaired).

Can you help Walter complete his task and gain the gang's trust?

Input

The first line of input contains two integers n, m (2 ≤ n ≤ 105, ), the number of cities and number of roads respectively.

In following m lines there are descriptions of roads. Each description consists of three integers x, y, z (1 ≤ x, y ≤ n, ) meaning that there is a road connecting cities number x and y. If z = 1, this road is working, otherwise it is not.

Output

In the first line output one integer k, the minimum possible number of roads affected by gang.

In the following k lines output three integers describing roads that should be affected. Each line should contain three integers x, y, z (1 ≤ x, y ≤ n, ), cities connected by a road and the new state of a road. z = 1 indicates that the road between cities x and y should be repaired and z = 0 means that road should be blown up.

You may output roads in any order. Each affected road should appear exactly once. You may output cities connected by a single road in any order. If you output a road, it's original state should be different from z.

After performing all operations accroding to your plan, there should remain working only roads lying on some certain shortest past between city 1 and n.

If there are multiple optimal answers output any.

Sample test(s)
Input
2 1
1 2 0
Output
1
1 2 1
Input
4 4
1 2 1
1 3 0
2 3 1
3 4 1
Output
3
1 2 0
1 3 1
2 3 0
Input
8 9
1 2 0
8 3 0
2 3 1
1 4 1
8 7 0
1 5 1
4 6 1
5 7 0
6 8 0
Output
3
2 3 0
1 5 0
6 8 1
Note

In the first test the only path is 1 - 2

In the second test the only shortest path is 1 - 3 - 4

In the third test there are multiple shortest paths but the optimal is 1 - 4 - 6 - 8


比D题简单,维护最短路的同时维护num[u]表示1->u的最短路上,拥有的有效路的数目的最大值,同时记录上一步的节点

最后枚举每一条边,判断即可


/*************************************************************************
    > File Name: cf287e.cpp
    > Author: ALex
    > Mail: 405045132@qq.com 
    > Created Time: 2015年01月24日 星期六 12时51分10秒
 ************************************************************************/

#include <map>
#include <set>
#include <queue>
#include <stack>
#include <vector>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <algorithm>

using namespace std;

const int N = 100010;
const int inf = 0x3f3f3f3f;

int dist[N];
int dp[N];
struct CODEFORCES
{
	int E;
	int V;
	void clear()
	{
		V = -1;
	}
}pre[N];
int head[N];
bool vis[N << 1];
bool vis_edge[N << 1];
int tot, n, m;

struct node
{
	int next;
	int to;
	int id;
	int sta;
}edge[N << 1];

void addedge (int from, int to, int sta, int id)
{
	edge[tot].id = id;
	edge[tot].to = to;
	edge[tot].sta = sta;
	edge[tot].next = head[from];
	head[from] = tot++;
}

void spfa ()
{
	queue <int> qu;
	while (!qu.empty())
	{
		qu.pop();
	}
	memset (dist, inf, sizeof(dist));
	memset (dp, 0, sizeof(dp));
	for (int i = 1; i <= n; ++i)
	{
		pre[i].V = -1;
	}
	dist[1] = 0;
	qu.push (1);
	while (!qu.empty())
	{
		int u = qu.front();
		qu.pop();
		for (int i = head[u]; ~i; i = edge[i].next)
		{
			int v = edge[i].to;
			if (dist[v] > dist[u] + 1)
			{
				dist[v] = dist[u] + 1;
				pre[v].V = u;
				pre[v].E = edge[i].id;
				if (edge[i].sta)
				{
					dp[v] = dp[u] + 1;
				}
				else
				{
					dp[v] = dp[u];
				}
				qu.push (v);
			}
			else if (dist[v] == dist[u] + 1)
			{
				if (edge[i].sta)
				{
					if (dp[v] < dp[u] + 1)
					{
						dp[v] = dp[u] + 1;
						dist[v] = dist[u] + 1;
						pre[v].V = u;
						pre[v].E = edge[i].id;
						qu.push(v);
					}
				}
				else
				{
					if (dp[v] < dp[u])
					{
						dp[v] = dp[u];
						dist[v] = dist[u] + 1;
						pre[v].V = u;
						pre[v].E = edge[i].id;
						qu.push(v);
					}
				}
			}
		}
	}
}

void dfs (int u)
{
	if (u == -1)
	{
		return;
	}
	dfs(pre[u].V);
	vis_edge[pre[u].E] = 1;
}

int main()
{
	int u, v, w;
	while (~scanf("%d%d", &n, &m))
	{
		memset (head, -1, sizeof(head));
		memset (vis_edge, 0, sizeof(vis_edge));
		memset (vis, 0, sizeof(vis));
		tot = 0;
		for (int i = 1; i <= m; ++i)
		{
			scanf("%d%d%d", &u, &v, &w);
			addedge (u, v, w, i);
			addedge (v, u, w, i);
		}
		spfa ();
		dfs (n);
		int ans = 0;
		for (int u = 1; u <= n; ++u)
		{
			for (int i = head[u]; ~i; i = edge[i].next)
			{
				int v = edge[i].to;
				if (!vis_edge[edge[i].id] && edge[i].sta && !vis[edge[i].id])
				{
					++ans;
					vis[edge[i].id] = 1;
				}
				else if (vis_edge[edge[i].id] && !edge[i].sta && !vis[edge[i].id])
				{
					++ans;
					vis[edge[i].id] = 1;
				}
			}
		}
		memset (vis, 0, sizeof(vis));
		printf("%d\n", ans);
		for (int u = 1; u <= n; ++u)
		{
			for (int i = head[u]; ~i; i = edge[i].next)
			{
				int v = edge[i].to;
				if (vis[edge[i].id])
				{
					continue;
				}
				if (!vis_edge[edge[i].id] && edge[i].sta)
				{
					printf("%d %d 0\n", u, v);
					vis[edge[i].id] = 1;
				}
				else if (vis_edge[edge[i].id] && !edge[i].sta)
				{
					printf("%d %d 1\n", u, v);
					vis[edge[i].id] = 1;
				}
			}
		}
	}
	return 0;
}


使用Zed 实现测距 此代码基于官方代码基础上进行改写,主要是获取zed相机深度画面的深度值,为yolo测距打基础。Zed相机是由Stereolabs公司开发的一种先进的立体视觉相机。这种相机专为计算机视觉和机器学习应用而设计,能够提供高质量的3D捕捉和分析功能。: Zed相机配备有一对垂直排列的传感器,能够捕捉两个略有偏移的图像,从而模拟人的双眼视觉,实现深度感知。: 利用立体成像技术,Zed相机能够实时生成环境的3D模型,这对于机器人导航、增强现实(AR)和虚拟现实(VR)等应用至关重要。 阅读详情

相关推荐

深入解析Flex NOC总线驱动的实时带宽与延迟优化策略

本文深入解析了Flex NOC总线驱动的核心价值与优化策略。通过解读`/proc/noc/real_time`中的实时带宽与延迟数据,并结合`sysfs`接口进行动态QoS调优,可以有效解决芯片内部数据拥堵问题。文章以智能摄像头和算力盒子的实际案例,详细说明了如何通过优先级调整、带宽限制和参数优化,提升系统在复杂任务下的实时性与稳定性。

weixin_29289821的博客 284

Codeforces Round #287 (Div. 2)【贪心、几何、二叉树性质、数位DP、最短路】

题目链接 A. Amr and Music 简单贪心,直接sort一下,先从小的开始选就可以了。 然后直接存答案输出。 #include <iostream> #include <cstdio> #include <cmath> #include <string> #include <cstring> #include ...

既然弱小,就只顾变强就是了 245

Apollo control模块横向控制原理及核心代码逐行解析

看完这篇文章,你会对apollo横向控制有一个整体的概念

weixin_39199083的博客 2万+

Codeforces Round #287 (Div. 2)A,B,C,D,E

A签到题排序之后贪心一下就可以了。 const int maxn = 10010; using namespace std; struct node { int pos; int num; }f[maxn]; bool cmp(node a, node b) { return a.num < b.num; } int p[maxn]; int main() {

I am a slow walker, but I never walk backwards! 1623

芯片级IO (Pad) Ring &IP Checklist

芯片级IO Ring,PAD Ring 和IP Checklist检查项目

weixin_37584728的博客 3571

在AVP28335(兼容德州仪器TMS320-28335) 上实现ModbusSlaveRTU-485源码及注释。

今天先把题目先给出来, 在近两天会把源码 (含详细注释 )及部署、测试结果给出来, 希望能给大家帮助。(全免费 我有点缺德,断了别人的一个财路)。

FOOLCODE的专栏 642

Codeforces Round #287 (Div. 2) C 构造

链接:戳这里 C. Guess Your Way Out! time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Amr bought a new video game "Guess Your Way Out!".

Cross 385

Isograph工具解析:FTA、RBD、FMECA与ETA在可靠性工程中的实战应用

可靠性工程是确保复杂系统安全稳定运行的核心学科,它通过量化方法评估和提升系统在特定条件下的无故障运行能力。其基本原理涉及对系统失效模式、概率及影响进行建模与分析,旨在将定性的工程经验转化为定量的决策依据。在工程实践中,故障树分析(FTA)和可靠性框图(RBD)是两种互为补充的关键技术:FTA采用自上而下的演绎逻辑,追溯导致顶事件发生的所有可能故障组合;RBD则采用自下而上的归纳逻辑,描述系统成功运行所需的功能结构关系。这些分析技术的工程价值在于能够提前识别设计薄弱环节,量化风险,并指导设计优化与维修策略制定

weixin_42522009的博客 316

Codeforces Round #287 (Div. 2) 解题报告

好久没写题了,底下代码都比较糟糕,将就着看吧。。 507A Amr and Music 要学最多的乐器,所以我们贪心选择时间花费少的。注意这里可以直接用pair,就不必写struct的compare函数了 1 #include<cstdio> 2 #include<cstring> 3 #include<algorithm&g...

weixin_30896763的博客 187

基于非接触式微波雷达设计的跌倒检测预警系统【短信报警】

本项目选择基于非接触式微波雷达的跌倒检测预警装置作为技术核心,采用云帆瑞达的R60AFD1跌倒检测模组。这一模组能够根据人体的运动变化,如速度、距离和姿态等特征,判断是否发生跌倒,并可以持续监控老年人是否处于危险状态。此外,本项目还结合4G通信技术,通过Air724UG模块实现短信报警功能,一旦检测到跌倒事故,系统将自动通过4G网络向紧急联系人发送短信报警,及时通知亲属或医护人员进行救援。

1755

RT-DETR改进前必看 - Ultralytics调参 1:1还原RT-DETR官方版本实验环境,更方便改进

的项目文件中集成了YOLOv3v5v6v8v9v10rt-detr11以及其中不同大小的模型结构,更方便我们学习和使用。的参数配置在路径下,其中中设置了模型在训练Train验证Val/Test预测Predict可视化Visualize导出Export超参数Hyperparameters、以及跟踪Tracker的相关参数。在调参过程中主要涉及训练Train和超参数Hyperparameters。下面主要介绍一下初始超参数Hyperparameters。

Limiiiing的博客 7962

2016 Winter Training Day #1_F题_codefcrces 507A(贪心)

A. Amr and Music time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Amr is a young coder who likes music a lot.

ize 572

YOLOv11改进 | Conv改进篇 | 含2种改进,引入DynamicConv替换普通Conv卷积下采样和C3k2_DynamicConv替换C3k2(来自CVPR2024)

本文提出了一种基于DynamicConv动态卷积优化的YOLOv11轻量化模型改进方案。通过引入多专家机制的动态卷积模块,在增加模型参数量的同时保持较低的计算复杂度(FLOPs),有效解决了低FLOPs模型在大规模预训练中的性能瓶颈问题。文章详细介绍了动态卷积的工作原理、核心代码实现,并提供了在YOLOv11中集成DynamicConv和C3k2_GhostModule_DynamicConv模块的完整教程,包括模块添加、配置文件修改和模型训练验证过程。实验结果表明,该方案在保持高效推理速度的同时显著提升了

Ai缝合怪、助力小伙伴高效发论文 537

Codeforces Round #287 (Div. 2) D. The Maths Lecture (数位dp)

题目链接 题面: 题意: 给定 n,k,m。 其中n是数的位数,不允许有前导0. k是给定的模数,要求某数存在一个后缀可以整除k。即 y%k==0,且y>0 m是给定的模数,要求最终答案对m取模。 即: 求n位数中,存在 可以整除k 的后缀的数的数量,其中后缀>0。 #include<iostream> #include<cstdio> #include<cstdlib> #include<algorithm> #include<cst

_Griefs 185

汉书HE8,好用的汇编代码编写工具

汉书HE8,好用的汇编代码编写工具早期编写汇编代码所用功能强大

LinePhone3.2.7(android端最新版本) sip客户端

SIP客户端For android:LinePhone3.2.7(最新版本),官网地址:http://www.linphone.org/

Codeforces Round 959

Codeforces Round 959

青少年趣味编程 631

蓝牙模块HM-10手册

蓝牙模块HM-10手册,该手册对蓝牙模块HM-10进行了详细的介绍和使用方法以及一些AT指令。

Codeforces Round #287 (Div. 2)

做了前三道,感觉这次的前三道不是很难。 507A - Amr and Music: 学乐器,给出乐器数、天数和每个乐器需要的天数。求能学会哪几个。 结构体排序,输出。 507B - Amr and Pins: 输入圆的半径初始位置、目标位置。求转移需要的最少的次数。 很容易想思路,一次最长能转移的距离等于直径,求位置之间的距离。然后除以直径向上取整。 507C - Guess Your Way Out!: 给出完全二叉树的深度,和目标叶子的编号。求在LRLRLR规则下,到目标叶片之前会经过多少叶子。 每走一

wcr1996的专栏 1537

Outlook Express 6 (OE6) for Win7/Win8/Win10

英文版 Outlook Express6.0, 兼容Win7/Win10/WinXP,解压就可用。

[Codeforces] Round #287 (Div. 2) A、B

507A - Amr and Music 题意:给定一个n和k,分别代表Amr有n种乐器 和 他的最多学习天数k。接下来输入这n种乐器分别需要ai天才能学会。问Amr在这k天最多能学会的乐器数,并且把所学的乐器输出,如果答案不唯一,输出任意解。 直接结构体排序,贪心即可。 #include #include #include #include #include #include

Freeway的博客 824

Codeforces Round #287 (Div. 2)B(几何)

题目链接:http://codeforces.com/contest/507/problem/B 解题思路: 两个圆心之间直线最短,求出圆心距,对其用ceil向上取整,注意中间计算时可能会溢出,开成long long。如果d能整出2*r,那么输出商即可,否则输出商+1。相交时只需要以交点为中心,再旋转一次即可。 完整代码: #include #include #incl

代码艺术的道与术 931

Codeforces Round #287 (Div. 2) C

507C - Guess Your Way Out!         题意:遍历一棵满二叉树,遍历方法是左右左右递归地遍历。树高度为h,最下层第n个节点是出口,问访问到出口前要访问多少个节点。         思路:按题目要求的顺序去递归遍历,判断出口在以当前节点为根的左子树还是右子树中,如果是在后访问的子树中,直接加上2^h,因为根加上另一颗子树刚好有2^h个节点,再往下递归。

A Cube Master 648

Codeforces Round #287 (Div. 2) 解题报告 A.B.C.D.E

这次的CF挺水的,当时B题犯了一个很SB的错误,浪费了好多时间,所以D和E也没来得及看。sad,。。 A - Amr and Music 水题,从小的开始选。 代码如下: #include #include #include #include #include #include #include #include #include using namespace st

scf0920 1299

AtCoder Beginner Contest 149

AtCoder Beginner Contest 149

青少年趣味编程 641

Codeforces Round #176 (Div. 2)

http://codeforces.com/contest/287 A:水。。。 B: 数学+贪心 或者 二分 题意: 给你k-1个如图形状的水管,他们的出水口分别为2,4,....k,只有一个总出水口,然后让你判断他们之间连接组成出水口为n的需要的最少的谁数,如果不能输出-1; 开始我用数学+贪心做的,结果忘记考虑一种情况WA了。 思路: 首先如果k>n我们只需要选择一...

weixin_30835923的博客 69

A Amr and Music( Codeforces Round #287 (Div. 2))

A. Amr and Music time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Amr is a young coder who likes music a lot.

叶孤心的专栏 1249

Codeforces Round #287 (Div. 2) C. Guess Your Way Out!

C. Guess Your Way Out! 题意:给一个深为h的树(从0层开始),从root以"LRLRLRLR..."的指令顺序,问道最后一层第n个节点需要遍历的节点个数。

ShiAokai 986

Codeforces Round #287 (Div. 2) E. Breaking Good(最短路spfa)

题目链接 题意:现在有n点m条路,要求你从1走到n,但是每条道路都有一个属性,1表示这条路可以走,0表示这条路在施工不能走,要你选择一条从1走到n的最短路,如果最短路上有道路的属性是0的话就要修好这条路,同时要破坏掉不是最短路径上的路,问你最少的操作数是多少(操作数是指要破坏的道路数和要修的道路数)。同时还要输出你的操作(就是要把你破坏的道路和修好的道路输出)。 思路:这个真是个阅读理解题,...

qq_42479630的博客 279

CodeForces Round #287 Div.2

A. Amr and Music (贪心) 水题,没能秒切,略尴尬。 1 #include <cstdio> 2 #include <algorithm> 3 using namespace std; 4 5 const int maxn = 100 +10; 6 int a[maxn], r[maxn], ans[maxn]; 7 ...

weixin_30652897的博客 128
上一篇: hdu4333----Revolving Digits
下一篇: hdu5163---Taking Bus
tokers
博客等级 码龄12年 71粉丝 700原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值