Codeforces Round #287 (Div. 2) 题解

关于瑞芯微SDK中buildroot的架构分析、配置细节、以及一些使用步骤 摘要:瑞芯微SDK基于Buildroot框架,针对RK3568等芯片提供定制化开发环境。核心目录包括buildroot(配置与编译框架)、kernel(定制内核)和u-boot(引导程序)。开发流程为:1)加载芯片默认配置;2)通过menuconfig定制系统(架构、内核、软件包等);3)可选修改内核配置。关键硬件适配需修改设备树(dts)和分区表(parameter.txt),系统行为通过启动脚本(S90network)调整。最终执行make编译生成可烧录固件。该框架通过配置文件驱动,实现从工具链构建到固 阅读详情
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;
}


毕设助力!从0到1构建基于YOLO的家居安防异常活动监测系统,让你的毕设守护家庭安全 做完这个项目,你会发现自己完整走过了“数据采集→标注→模型训练→功能集成→界面开发”的毕设全流程,这不仅是技术能力的证明,更是对“技术守护生活”这一理念的实践。答辩时,你可以重点讲这几点:系统解决了家居安防的哪些痛点、对比了不同YOLO模型的性能差异、系统未来能怎么优化(比如对接智能门锁/报警器、实现语音交互)。未来,这个系统还能往“更智能”的方向发展:比如结合行为分析判断异常意图、开发移动端APP实现全屋设备联动、在智慧社区中实现多家庭联防……想象空间很大。 阅读详情

相关推荐

STM32与SD卡SPI接口硬件设计:从原理图到调试的完整指南

SPI(串行外设接口)作为一种广泛应用的同步串行通信协议,以其接线简单、驱动成熟的特点,成为连接微控制器与各类外设的经典方案。其工作原理基于主从架构,通过时钟、数据线和片选信号实现全双工通信,在嵌入式系统中具有极高的技术价值,常用于连接传感器、存储设备和显示模块等。在数据存储场景中,SD卡凭借其大容量和便携性成为首选,而通过SPI模式驱动SD卡,则平衡了性能与设计复杂度。本文聚焦于使用Altium Designer进行硬件设计的工程实践,详细解析了STM32微控制器与SD卡通过SPI通信时,电源管理、上拉电

weixin_34101784的博客 555

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

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

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

开关变换器小信号建模实战:从理论到环路设计

本文深入探讨了开关变换器小信号建模的实战技巧,从理论基础到环路设计全面解析。通过Buck和Boost变换器的具体案例,详细介绍了状态空间平均法、扰动法等关键建模技术,并分享环路补偿设计和实际调试中的宝贵经验。文章特别强调了小信号建模在电源设计中的重要性,为工程师提供了从理论到实践的完整解决方案。

weixin_29290259的博客 376

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

从流量到凭证:实战解析SMB协议中的NTLMv2/v1哈希提取与破解

本文详细解析了SMB协议中NTLMv2/v1哈希的提取与破解实战技巧。从流量捕获、哈希格式处理到Hashcat高效破解,提供了一套完整的操作指南。文章特别强调了NTLMv2和NTLMv1哈希的区别及处理要点,并分享了防护建议与检测方法,帮助安全人员提升渗透测试效率。

weixin_30642561的博客 116

【YOLOv11多模态融合改进】| CVPR2025 LCA轻量交叉注意力 双向模态交叉引导 + 双支路噪点抑制,兼顾纹理与热目标特征融合

可见光模态富含纹理、色彩、边缘细节,但夜间/低照度场景信噪比极低,暗区噪声泛滥;红外模态依靠热辐射凸显弱小目标、暗区物体轮廓,但缺失真实色彩与精细纹理。简单拼接/逐加融合仅做浅层特征叠加,无法建立可见光纹理、红外热特征的双向引导关联,两类模态互补信息无法精准互通;普通自注意力仅单模态内部建模,跨模态交互匮乏,红外热目标易被可见光暗噪声淹没,可见光有效纹理易被红外灰度信息覆盖;

Limiiiing的博客 119

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

ESP32-IDF开发之旅 网络篇⑩ Web配网

本文介绍了基于ESP32S3的Web配网实现方案。作者通过移植开源项目,在ESP32S3上实现了WiFi配置功能,包括AP模式创建、HTTP服务器搭建、NVS存储读写等核心功能。文章详细解析了代码结构,包含WiFi初始化、事件处理、NVS存储管理和HTML页面服务等关键模块。实现方案采用AP+STA双模式,支持通过网页扫描WiFi并保存配置信息,适用于物联网设备的网络配置场景。代码中使用了FreeRTOS任务、ESP-IDF事件组等技术,并提供了完整的错误处理和日志记录功能。

单片机菜鸟哥的博客 350

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

从零开始玩转边缘 AI:Jetson Nano 深度学习环境搭建与 YOLOv5 部署指南

Jetson Nano是NVIDIA推出的嵌入式AI开发板,凭借其强大的GPU计算能力和完善的软件生态系统,成为边缘AI部署的理想平台。本教程源于作者团队参加2024中国机器人大赛暨RoboCup机器人世界杯中国赛机器人先进视觉3D识别赛道的实战经验,是一份经过验证的环境部署指南。

LXY_LOVE36的博客 234

Thinkpad可以安装Win11吗?Thinkpad升级Win11教程

win11正式版推出之后,不少用户也想要体验一把新系统,但是不知道thinkpad是否支持win11,其实基本上现在在售的都是可以升级win11的。2、如果大家使用的是老款的ThinkPad,那么可以通过软件来检测自己是否支持win11。【电脑健康状况检查下载】答:在售的ThinkPad都是可以支持win11的,但是部分旧版本不支持。2、这时候想要升级win11的话,就可以通过镜像系统的方式来跳过系统检测。3、如果使用上面的软件检测可以支持win11,那么只要进入“设置”

xhp618的博客 2987

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

ET2012新版免狗免安装绿色软件

ET2012新版免狗免安祖昂绿色软件。,新界面,新视觉,

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

IEM模型,地表粗糙度模拟

利用微波反演土壤水分时候,利用IEM模型可以实现对随机地表的模拟

efm32 入门.pdf

本PDF共计22页,介绍的是操作驱动API,下载与否自己斟酌。

Codeforces Round 959

Codeforces Round 959

青少年趣味编程 631

霍尼韦尔SoftMaster使用说明

霍尼韦尔SoftMaster使用说明

Codeforces Round #287 (Div. 2)

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

wcr1996的专栏 1537

[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、付费专栏及课程。

余额充值