Description Have you played Draw Something? It's currently one of the hottest social drawing games on Apple iOS and Android Devices! In this game, you and your friend play in turn. You need to pick a word and draw a picture for this word. Then your f…
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3603 Draw Something Cheat Time Limit: 2 Seconds      Memory Limit: 65536 KB Have you played Draw Something? It's currently one of the hottest social drawing games on Apple iOS and Android D…
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3603 题意:在给出的字符串中找出每行都出现的字母按字典序排序. #include <bits/stdc++.h> using namespace std; int main() { int t; cin>>t; while(t--) { int num[107],num1[107]; char s[107]; int n; cin>>n; mem…
Description Let S = s1 s2...s2n be a well-formed string of parentheses. S can be encoded in two different ways: q By an integer sequence P = p1 p2...pn where pi is the number of left parentheses before the ith right parenthesis in S (P-sequence). q B…
查找ACM(加强版) Time Limit: 2000/1000ms (Java/Others) Problem Description: 作为一个acmer,应该具备团队合作能力和分析问题能力.给你一个只有a,c和m的字符串,你要依次取3个字母使之恰好为acm. 比如串 accmmmca 你可以取 12345678 ac_m____ ac__m___ ac___m__ a_cm____ a_c_m___ a_c__m__共6种. 你只要给出给你的串有多少种方案能组成acm. Input: 输入…
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=4706 思路:字符串是一个集合(由0到多个A~Z字符组成),我们可以假设初始集合是多个A,多个B--多个Z组成.用unsigned char nums[26] 来标记它们,nums[i] 表示的是字母('A' + i)的个数,把它初始化为一个很大的数字,255就够了.然后对每一次给出的12个字母,我们取它和现有集合的交集,这样不断的取,就能渐渐取出这n个字符串的交集了…
这个想法之前就在脑袋里有过,最近公司产品要用到,所以多做了些了解. 1. USB 简介 USB 是 Universal Serial Bus 的缩写,从字面上看,就是通用串行总线的意思.从物理上看,其实就是一对差分线,连接两台设备后,相互间进行数据传输.加上另外两路供电( 5V 和 GND)线,一共是 4 根线. 那么,既然是只有一对差分线,那么该如何决定由谁传给谁呢(如果两边同时在线上建立电平,线路上的电平会是不确定态的,以致无法通信)?这就要说到 USB 传输的一个重要基础:“询问-应答”…
Description   Your new company is building a robot that can hold small lightweight objects. The robot will have the intelligence to determine if an object is light enough to hold. It does this by taking pictures of the object from the 6 cardinal dire…
"One thing is for certain: there is no stopping them;the ants will soon be here. And I, for one, welcome ournew insect overlords." Kent Brockman Piotr likes playing with ants. He has n of them on a horizontal pole L cm long. Each ant is facing e…
Description Kochiya Sanae is a lazy girl who makes and sells bread. She is an expert at bread making and selling. She can sell the i-th customer a piece of bread for price pi. But she is so lazy that she will fall asleep if no customer comes to buy b…