[poj3169 Layout] [Differential Constraint] [Bellman-Ford]

... [Link] [[I] #include<cstdio> #include<math.h> #include<string> #include<vector> #include<algorithm> #include<iostream> using namespace std; const int maxn = 1e5 + 6; const int inf = 0x3f3f3f3f; int d[maxn]; struct node1 { int a,b,c; }k1[maxn]; struct...


01 backpack Constant optimization

... 趁2020肝 The last 20 minutes of the summer self-study out of this blog... Such an obvious 01 backpack naked question (really to use "obvious" to describe it?). The original one-dimensional array code is: #include <iostream> #include <cstring> #include <cstdio> #define...


iOS An HTTPS connection client and server interaction process

... In an HTTPS connection network, after entering the account number and password and clicking the login button, before the server returns this request, what happened during this period? 答: Specifically experienced 8 steps: client package request. This includes URLs, ports, accounts, and...


Greedy Algorithm - Pirates of the Caribbean: Optimal Loading Problem

... Problem Description: One day, the pirates intercepted a cargo ship filled with all kinds of antiques, each piece of antiques is worthless. Breaking it loses its value. Although the pirate ship is big enough, but the weight is C, the weight of each antique is wi, how should pirates put...


2044 Problem C Magic Pocket

... 问题 C: Magic Pocket Time Limit: 1 Sec Memory Limit: 32 MB Submitted: 427 Solution: 196 [submit] [status] [discussion version] [proposition person: external import] 题描述 has a magic pocket, the total volume is 40, with this pocket can change some items, these items The total volume must be...


1020-moon cake (25)

... 月饼 is a traditional food that Chinese people eat during the Mid-Autumn Festival. There are many different flavors of moon cakes in different regions. Now give the stock quantity, total selling price, and the maximum demand of the market for all kinds of moon cakes. Please calculate the...


L1-005 Exam Seat Number (15 points)

... L1-005 Exam Seat Number (15 points) Each PAT candidate will be assigned two seat numbers when taking the test, one is the test seat. One is the test seat. Under normal circumstances, the candidate will get the seat number of the test machine when entering the venue. After entering the...


C++ Structure Sorting Exercise

... 7-37 Simulating EXCEL Sorting (25 points) Excel can sort a group of records by any specified column. Now write a program that implements similar functionality. Input format: The first line of input contains two positive integers N (≤10 5 ) and C, where N is the number of records, and C...


PKU pointer part exercises

... /* Programming #2: Two-dimensional array upper right left lower traversal Source: POJ (Coursera Statement: The exercises completed on the POJ will not count towards the final score of Coursera.) Note: Total time limit: 1000ms Memory limit: 65536kB description Given an array of integer...


Hdu 1408 (high-precision) pit people tender

... Problem Description 挂 salt water, if the drop is regular, first drop a drop, stop; then drop two drops, stop; drop three drops, stop..., now One problem: this bottle of salt has a total of VUL milliliters, each drop is D ml, the speed of each drop is one second (assuming the last drop...