注册一亩三分地论坛,查看更多干货!
您需要 登录 才可以下载或查看附件。没有帐号?注册账号 
x
主要 string manipulation, 可能要用一些std::istringstream, getline() 等等處理。處理完之後要自己寫一個自定義的comparison function 去做sorting。完成第一個任務才能接下去。
第一題:
Input
The input is an array of strings, where each element represents a row in a chargeback file. The array of strings contains data for N chargeback files (where 1 ≤ IN ≤ 10), each of which are formatted as follows:
• First row: A filename containing the (always uppercase) network name (any one of "VISA",
"PAYPAL", "AMEX", "CB") followed by an underscore, followed by a date in yyyymmdd format. The file name will always end in .csv (e.g. VISA_20220131.csv).
• Second row: A comma-separated list of the following field names, appearing in any order:
o transaction: The ID cornit (e.g.
2000 major units JPY = 2000 minor units JPY =
¥2000)
• Use a period as the separator between the whole and decimal parts of the amount.
• Evidence due by: Same as evidence_ due_by as defined in the input above.
The list of disputes should be lexicographically sorted by dispute ID, as defined above.
write a function: string parseNetworkChargebackInfo(vector<string> rows) {}
新人求大米~ |