让gpt尽量还原了!
限时50min 对我来说还是太难了 不知道有没有大佬过了
**Question**: **Catch Me If You Can**
**Background**:
Stripe processes billions of dollars worth of transactions every day. As guardians of the Internet ecosystem, it is essential to ensure that legitimate merchants can safely transact with their customers, and that we quickly detect and block illegitimate or fraudulent activity. Stripe employs various machine learning models at scale, such as Radar, to detect fraudulent transactions as they come in. These models examine different variables about incoming transactions to determine their authenticity.
One input to examine is the outcome from credit card networks like Visa or Mastercard. These networks communicate with banks and provide response codes to reflect the outcomes of credit card transactions. Our goal is to develop a simple fraud detection model to determine if a merchant is fraudulent.
---
### **Part 1**:
Each Stripe merchant has an associated Merchant Consumer Code (MCC) specifying what kind of business the merchant operates. Certain businesses, such as airlines or event venues, are more risky than others, so there are different fraud tolerances for them.
We will use a basic algorithm to detect fraud: if a merchant is ever at or above a certain threshold acct_1,300,do_not_honor
DISPUTE,ch_2
CHARGE,ch_4,acct_2,400,approved
CHARGE,ch_5,acct_2,500,lost_card
```
Output:
```
acct_1
```
---
### **Part 3**:
Our fraud detection model is working well in the wild, but some merchants are disputing certain transactions marked as fraudulent by the credit card networks. We will now allow merchants to dispute transactions that were marked as fraudulent. If a merchant disputes a transaction and the dispute is accepted, the transaction will no longer count as fraudulent. Merchants can return to a non-fraudulent status if their ratio drops below the required threshold.
Disputes will be provided as:
```
DISPUTE,charge_id
```
You will update the list of fraudulent merchants accordingly. |