Sicily

sicily substring 1198

不问归期 提交于 2021-01-13 22:04:07
这个题目是一个很简单的字符串相连的题目。之前没有看清题目,所以提交的时候出现的错误!一个很简单的关于字符串排序的问题。 难点: 需要考虑到字符串连接之后因为串的长度不一所导致的大小不一问题,比如:b>ba, 但是bba > bab。也就是说,我们不能够直接用list.sort函数下面的排序规则。 // substring.cpp : Defines the entry point for the console application. // //# include"stdafx.h" #include <iostream> # include <list> # include <string> # include <vector> using namespace std; typedef list<string> LISTSTRING; list<string>::iterator it_LIST; vector<LISTSTRING> vec; vector<LISTSTRING>::iterator it_VEC; int main() { //cout << "qinqintudou" << endl; bool compare(string a, string b); // input the subString int T,n; cin >> T; while (T--

sicily 1563 GECKO

别说谁变了你拦得住时间么 提交于 2021-01-13 09:49:57
Description During the rainy season, one of the walls in the house is infested with mosquitoes. The wall is covered by h × w square tiles, where there are h rows of tiles from top to bottom, and w columns of tiles from left to right. Each tile has 1 to 1000 mosquitoes resting on it. A gecko wants to eat as many mosquitoes as possible, subject to the following restrictions. It starts by choosing any tile in the top row, and eats the mosquitoes in that tile. Then, it moves to a tile in the next lower row, eats the mosquitoes on the tile, and so on until it reaches the floor. When it moves from

sicily 1083 Networking

六月ゝ 毕业季﹏ 提交于 2020-12-13 11:48:50
Description You 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 points. For each possible route between two points, you are given the length of the cable that is needed to connect the points over that route. Note that there may exist many possible routes between two given points. It is assumed that the given possible routes connect (directly or indirectly) each two points in the area. Your task is to design the network for the area, so that there is