最小生成树View Code #include<iostream>#include<cstdio>#include<cstdlib>#include<cstring>usingnamespacestd;#definemaxn55#defineinf0x3f3f3f3fintn,m;intvis[maxn];intlowc[maxn];intcost[maxn][maxn];intprim(){inti,j,p;intminc,res=0;memset(vis,0,sizeof(vis));vis[0]=1;for(i=1;i<n;i++)l
转载 2011-07-14 10:21:00
34阅读
2评论
NetworkingTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 4457Accepted: 2421DescriptionYou are assigned to design network connections between certain points in a wide area. You are given a set of points in the area, and a set of possible routes for the cables that may connect pairs of point
原创 2021-07-29 16:20:36
105阅读
做完难的…… 再看这题就感觉特别水…… 注意...
转载 2016-02-20 04:26:00
62阅读
2011-12-27 15:16:26地址:http://acm.hdu.edu.cn/showproblem.php?pid=1287题意:这题的题意很让人莫名。其实是说存在一个大写字母x,然后让原文(都是大写字母)和x做xor后得到密文。现在给密文求原文。因为x不知道,所以枚举x。判断方法是判断是否解密出来的原文都在'A'-'Z'范围内。代码:# include <stdio.h>int num[10010] ;int n ;int test (int x){ int i ; for (i = 0 ; i < n ; i++) if ((n
转载 2012-01-06 23:56:00
43阅读
NetworkingTime Limit: 1000msMemory Limit: 10000KBThis problem will be judged on PKU. Original ID: 1287 64-bit integer IO format: %lld Ja...
转载 2015-03-12 21:24:00
61阅读
原创 2022-12-07 05:49:40
84阅读
:::---> a = b ^ c —-> c = a ^ b b = a ^ c,就是异或递推的关系。http://acm.hdu.edu.cn/showproblem.php?pid=1287V吗
原创 2021-08-01 14:15:27
109阅读
一、错误日志1:记录哪些信息Mysql执行过程中的错误信息Mysql执行过程中的警告信息Mysql服务器启动和关闭过程中的所有输出信息(不一定是错误信息)event scheduler运行时所产生的信息主从复制结构中,从服务器IO复制线程的启动信息2:保存在哪Show variables like ‘%log_error%’;3:记录警告信息log_warnings:表示警告信息是否一起记录在错误
题目地址:点击打开链接 思路: 异或运算法则 1. a ^ b = b ^ a  2. a ^ b ^ c = a ^ (b ^ c) = (a ^ b) ^ c;  3. d = a ^ b ^ c  可以推出 a = d ^ b ^ c.  4. a ^ b ^ a = b. 异或还有逆运算 a^b=c,则a=b^c AC代码: #include int a[3
原创 2022-08-04 09:12:22
23阅读
最小生成树
原创 2023-02-17 08:55:06
43阅读
做完难的…… 再看这题就感觉特别水…… 注意...
转载 2016-02-20 04:26:00
60阅读
1 问题运行项目连接Mysql时出现警告Establishing SSL connection without server's identity verification is not ...
原创 2022-04-11 14:35:35
315阅读
显示警告(打开):warnings查看警告(查看内容):show warnings;记录运行日志:tee _logsfile source sql_filenotee
原创 2023-11-07 09:23:31
86阅读
场景产品中有一张图片表pics,数据量将近100万条,有一条相关的查询语句,由于执行频次较高,想针对此语句进行优化表结构很简单,主要字段:user_id 用户ID picname 图片名称 smallimg 小图名称一个用户会有多条图片记录,现在有一个根据user_id建立的索引:uid,查询语句也很简单:取得某用户的图片集合:select picname, smallimg from pics
转载 2024-09-19 22:50:44
0阅读
题目链接:http://acm.pku.edu.cn/JudgeOnline/problem?id=1287[代码]
原创 2021-08-04 16:14:08
59阅读
1287水DP 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 using namespace std; 8 #define N 1402 9 int dp[N][N][4];10 char s[N][N];11 int main()12 {13 int i,j,n;14 scanf("%d",&n);15 for(i = 0 ; i >s[i];17 dp[0][0][0] = 1;18 dp[0][n-1][3] = 1;19 for(i = 0 ; i...
转载 2013-10-20 20:35:00
62阅读
2评论
题目链接:http://acm.pku.edu.cn/JudgeOnline/problem?id=1287   #include <iostream>  #include <limits>  using namespace std;   const int M
原创 2009-09-12 14:31:00
342阅读
思路:最小生成树模板题#include #include #include #include #include #include #include #include #include #include #include #include # maxn 1000#define LL lon
原创 2023-06-12 14:12:53
50阅读
Prim最小生成树
转载 2016-09-12 15:55:00
30阅读
2评论
大意:
原创 2022-10-14 15:04:49
31阅读
  • 1
  • 2
  • 3
  • 4
  • 5