nyoj 20水】的更多相关文章

#include<stdio.h> #include<string.h> #define N 110000 struct node { int u,v,next; }bian[N*2]; int head[N],yong,pre[N]; void addedge(int u,int v) { bian[yong].u=u; bian[yong].v=v; bian[yong].next=head[u]; head[u]=yong++; } int visit[N]; void df…
博主欢迎转载,但请给出本文链接,我尊重你,你尊重我,谢谢~http://www.cnblogs.com/chenxiwenruo/p/6789189.html特别不喜欢那些随便转载别人的原创文章又不给出链接的所以不准偷偷复制博主的博客噢~~ 水题,找出哪个数只出现过一次,输出那个数如果没有的话,输出None #include <iostream> #include <cstdio> #include <algorithm> #include <string.h&g…
#include <iostream> #include <cstdio> #include <string.h> #include <algorithm> using namespace std; /* 水题,注意字符范围是整个ASCII编码即可. */ ; int vis[maxn]; +]; +]; int main() { gets(s1); //getchar(); gets(s2); int len1=strlen(s1); int len2=s…
博主欢迎转载,但请给出本文链接,我尊重你,你尊重我,谢谢~http://www.cnblogs.com/chenxiwenruo/p/6789775.html特别不喜欢那些随便转载别人的原创文章又不给出链接的所以不准偷偷复制博主的博客噢~~ 水题,就是统计n个数的数位和有多少个不同的,并且输出即可. #include <iostream> #include <cstdio> #include <algorithm> #include <string> #in…
水题系列 时间限制:1000 ms  |  内存限制:65535 KB 难度:2   描述     给你一个有向图,每条边都有一定的权值,现在让你从图中的任意一点出发,每次走的边的权值必须必上一次的权值大的情况下,问你最多能走几条边?   输入 首先一个n和m,分别表示点的数目和边的数目接下来m行,每行三个值x,y,val,表示x到y有路,其权值为val.(1<n,m,val<10^5,0<x,y<=n) 输出 输出最多有的边的数目 样例输入 3 3 1 2 1 2 3 1 3 1…
12-喷水装置(二) 内存限制:64MB 时间限制:3000ms Special Judge: No accepted:10 submit:30 题目描述: 有一块草坪,横向长w,纵向长为h,在它的橫向中心线上不同位置处装有n(n<=10000)个点状的喷水装置,每个喷水装置i喷水的效果是让以它为中心半径为Ri的圆都被润湿.请在给出的喷水装置中选择尽量少的喷水装置,把整个草坪全部润湿. 输入描述: 第一行输入一个正整数N表示共有n次测试数据. 每一组测试数据的第一行有三个整数n,w,h,n表示共…
http://acm.nyist.net/JudgeOnline/message.php?msg=已提交&url=status.php%3Fpid%3D20&second=0 #include<stdio.h> #include<iostream> #include<vector> #include<string.h> using namespace std; vector<]; ]; void func(int x) { int i;…
吝啬的国度 时间限制:1000 ms  |  内存限制:65535 KB 难度:3   描述 在一个吝啬的国度里有N个城市,这N个城市间只有N-1条路把这个N个城市连接起来.现在,Tom在第S号城市,他有张该国地图,他想知道如果自己要去参观第T号城市,必须经过的前一个城市是几号城市(假设你不走重复的路).   输入 第一行输入一个整数M表示测试数据共有M(1<=M<=5)组每组测试数据的第一行输入一个正整数N(1<=N<=100000)和一个正整数S(1<=S<=100…
#include <iostream> #include <cstdio> #include <algorithm> #include <string.h> #include <cmath> #include <queue> using namespace std; ]; ]={','A','B','C'}; int main() { scanf(],&color[],&color[]); printf("#…
题意:给n个用户名和密码,把密码中的1改为@,0改为%,l改为L,O改为o. 让你输出需要修改密码的用户名个数,以及对应的用户名和密码,按输入的顺序.如果没有用户需要修改,则输出对应的语句,注意单复数... 没啥好说的,就for一遍密码,把需要改的改下,存入到ans中去. #include <iostream> #include <cstdio> #include <algorithm> #include <string.h> #include <cm…