题目 Eva loves to collect coins from all over the universe, including some other planets like Mars. One day she visited a universal shopping mall which could accept all kinds of coins as payments. However, there was a special requirement of the payment…
题目 A vertex cover of a graph is a set of vertices such that each edge of the graph is incident to at least one vertex of the set. Now given a graph with several vertex sets, you are supposed to tell if each of them is a vertex cover or not. Input Spe…
Eva loves to collect coins from all over the universe, including some other planets like Mars. One day she visited a universal shopping mall which could accept all kinds of coins as payments. However, there was a special requirement of the payment: f…
题目 On a broken keyboard, some of the keys are worn out. So when you type some sentences, the characters corresponding to those keys will not appear on screen.Now given a string that you are supposed to type, and the string that you actually type out,…
题目 Given two strings S1 and S2, S = S1 – S2 is defined to be the remaining string afer taking all the characters in S2 from S1. Your task is simply to calculate S1 – S2 for any given strings. However, it might not be that simple to do it fast. Input…
题目 Being unique is so important to people on Mars that even their lottery is designed in a unique way. The rule of winning is simple: one bets on a number chosen from [1, 10^4]. The first one who bets on a unique number wins. For example, if there ar…
1048. Find Coins (25) 时间限制 50 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue Eva loves to collect coins from all over the universe, including some other planets like Mars. One day she visited a universal shopping mall which could accept a…
1048 Find Coins (25 分)   Eva loves to collect coins from all over the universe, including some other planets like Mars. One day she visited a universal shopping mall which could accept all kinds of coins as payments. However, there was a special requ…
二次方探测解决冲突一开始理解错了,难怪一直WA.先寻找key%TSize的index处,如果冲突,那么依此寻找(key+j*j)%TSize的位置,j=1~TSize-1如果都没有空位,则输出'-' #include <iostream> #include <cstdio> #include <algorithm> #include <string.h> #include <cmath> using namespace std; ; //之前设置…
题目 编程团体赛的规则为:每个参赛队由若⼲队员组成:所有队员独⽴⽐赛:参赛队的成绩为所有队员的成绩和:成绩最⾼的队获胜.现给定所有队员的⽐赛成绩,请你编写程序找出冠军队. 输⼊格式: 输⼊第⼀⾏给出⼀个正整数N(<=10000),即所有参赛队员总数.随后N⾏,每⾏给出⼀位队员的成绩,格式为:"队伍编号-队员编号 成绩",其中"队伍编号"为1到1000的正整数,"队员编号"为1到10的正整数,"成绩"为0到100的整数.…