Water --- CSU 1550: Simple String】的更多相关文章

Simple String Problem's Link:   http://acm.csu.edu.cn/OnlineJudge/problem.php?id=1550 Mean: 略. analyse: 水题. Time complexity: O(n) Source code:  // Memory Time // 1347K 0MS // by : crazyacking // 2015-03-29-12.08 #include<map> #include<queue> #…
题目链接:http://acm.csu.edu.cn/csuoj/problemset/problem?pid=1550 题解: 1.A+B 与C的交集必须>=n 2.A与C的交集必须>=n/2,B与C的交集必须>=n/2. 代码如下: #include <iostream> #include<algorithm> #include<cstdio> #include<cstring> #include<algorithm> us…
1550: Simple String Submit Page    Summary    Time Limit: 1 Sec     Memory Limit: 256 Mb     Submitted: 682     Solved: 287 Description Welcome,this is the 2015 3th Multiple Universities Programming Contest ,Changsha ,Hunan Province. In order to let…
http://acm.csu.edu.cn/csuoj/problemset/problem?pid=1550 很久以前做的一题,当时队友用最大流做,现在我也是 这个转化为二分图多重匹配,就是一样的意思了. 设出一个原点S,两个人1,和2,S-->1的流量是n表明只能流出n个字母,s-->2的流量是n,一样含义. 然后再设一个汇点T,表明需要有多少流进来,跑一发就好. #include <bits/stdc++.h> #define IOS ios::sync_with_stdio…
1550: Simple String Time Limit: 1 Sec  Memory Limit: 256 MBSubmit: 481  Solved: 211[Submit][Status][Web Board] Description Welcome,this is the 2015 3th Multiple Universities Programming Contest ,Changsha ,Hunan Province. In order to let you feel fun,…
A - Simple String Problem Time Limit:10000MS     Memory Limit:65536KB     64bit IO Format:%lld & %llu  Practice POJ 2236 Description An earthquake takes place in Southeast Asia. The ACM (Asia Cooperated Medical team) have set up a wireless network wi…
Simple String Problem Recently, you have found your interest in string theory. Here is an interesting question about strings. You are given a string S of length n consisting of the first k lowercase letters. You are required to find two non-empty sub…
http://acm.csu.edu.cn/csuoj/problemset/problem?pid=1550 很久都没补这题,最近想学网络流,就看看,队友以前用网络流过的,Orz, 但是这题只需要简单的判断,可能想起来有点麻烦. 考虑一定要从A串取出n个,B串也一定要取出n个,那么A和C的交集一定要大于等于n,同理B. 同时为了得到C串,还需要A + B和C的交集一定要大于等于n * 2 怎么说呢.可以画个图表示下,反正找不到反例.就先码一波. #include <cstdio> #incl…
Description 题目描述 Recently, you have found your interest in string theory. Here is an interesting question about strings. You are given a string S of length n consisting of the first k lowercase letters. You are required to find two non-empty substrin…
Description 有一个N*N的字符矩阵,从上到下依次记为第1行,第2行,……,第N行,从左至右依次记为第1列,第2列,……,第N列. 对于这个矩阵会进行一系列操作,但这些操作只有两类: (1) R: 将矩阵逆时针旋转90度: (2) P x y: 将此时第x行第y列的字符打印出来,其中1 <= x, y <= N.   Input 输入数据的第一行包含一个整数T (1 <= T <= 20),表示接下来一共有T组测试数据. 对于每组测试数据,第一行包含一个整数N (1 &l…