Fraud Busters

链接:https://ac.nowcoder.com/acm/contest/7852/H 来源:牛客网

The number of cars in Default City that travel to the city center daily vastly exceeds the number of available parking spots. The City Council had decided to introduce parking fees to combat the problem of overspill parking on the city streets. Parking fees are enforced using an automated vehicle registration plate scanners that take a picture of the vehicle registration plate, recognize the sequence of digits and letters in the code on the plate, and check the code against a vehicle registration database to ensure that parking fees are dutifully paid or to automatically issue a fine to the vehicle owner otherwise.
As soon as parking fees were introduced, a parking fee fraud had appeared. Some vehicle owners had started to close one or several digits or letters on their vehicle registration plate with pieces of paper while they park, thus making it impossible for the current version of the automated scanner to recognize their vehicle’s registration code and to issue them a fine.
The Default City Council had instituted the Fraud Busters Initiative (FBI) to design a solution to prevent this kind of fraud. The overall approach that FBI had selected is to expand the number of vehicle features that scanners recognize (including features like vehicle type and color), as well as excluding from the list any vehicles that are detected to be elsewhere at this time. This information should help to identify the correct vehicle by narrowing down the search in the vehicle registration database.
You are working for FBI. Your colleagues had already written all the complex pieces of the recognition software that analyses various vehicle features and provides you with a list of registration codes that might potentially belong to a scanned car. Your task it to take this list and a recognized code from the license plate (which may be partially unrecognized) and find all the registration codes that match.

输入描述:
The first line of the input file contains 9 characters of the code as recognized by the scanner. Code that was recognized by the the scanner is represented as a sequence of 9 digits, uppercase English letters, and characters “*” (star). Star represents a digit or a letter that scanner could not recognize.
The second line of the input file contains a single integer number n (1 ≤ n ≤ 1000) — the number of vehicle registration codes from the vehicle registration database.
The following n lines contain the corresponding registration codes, one code per line. Vehicle registration codes are represented as a sequence of 9 digits and uppercase English letters. All codes on these n lines of the input file are different.

输出描述:
On the first line of the output file write a single integer k (0 ≤ k ≤ n) — the number of codes from the input file that match the code that was recognized by the scanner. The code from the scanner matches the code from the database if the characters on all the corresponding positions in the codes are equal or the character from the scanner code is “*”.
On the following k lines write the matching codes, one code per line, in the same order as they are given in the input file.

示例1
输入
A**1MP19*
4
A001MP199
E885EE098
A111MP199
KT7351TTB

输出
2
A001MP199
A111MP199

题意:给一个车牌,位置不用管,其他位置相等,即为输出字符串。
思路:模拟、比对非
号位置字符串即可。

#include<bits/stdc++.h>
using namespace std;
typedef  long long ll;
string ss[1005];
string sss[1005];
int main()
{string s;cin>>s;int n;int cnt=0;cin>>n;for(int i=0;i<n;i++)cin>>ss[i];for(int i=0;i<n;i++){int flag=0;for(int j=0;j<ss[i].size();j++){// cout<<"*"<<s[j]<<" "<<ss[i][j]<<endl;if(s[j]=='*')continue;else{if(s[j]!=ss[i][j]){flag=1;break;}}}if(flag==0){sss[cnt]=ss[i];cnt++;}}cout<<cnt<<endl;for(int i=0;i<cnt;i++)cout<<sss[i]<<endl;}

Fraud Busters相关推荐

  1. Kaggle系列-IEEE-CIS Fraud Detection第一名复现

    赛题背景 想象一下,站在杂货店的收银台,身后排着长队,收银员没有那么安静地宣布您的信用卡被拒绝了.在这一刻,你可能没有想到决定你命运的数据科学. 非常尴尬有木有?当然你肯定有足够的资金为50个最亲密的 ...

  2. 阅读笔记:Solving the “false positives” problem in fraud prediction

    刚读完一篇paper<Solving the "false positives" problem in fraud prediction>,趁热打铁,做个笔记. 文章下 ...

  3. TensorFlow for Hackers (Part VII) - Credit Card Fraud Detection using Autoencoders in Keras

    It's Sunday morning, it's quiet and you wake up with a big smile on your face. Today is going to be ...

  4. *** line xxxx of `fraud.data': bad value of xxxx for attribute `id_11'

    Quinlan的C4.5以及C5.0在处理大数据的时候可能会碰到下面的问题. 完整错误复现如下: *** line 52964 of `fraud.data': bad value of `92.41 ...

  5. 同质异质网络——(F(fraud) A(Analytics) UDPSNT(Wylie_2015))

    当标签x的结点更大程度上连接其他标签x的结点的时候,这个网络是同质的.非同质的网络是异质的. 这里定义的同质异质网络是指行骗者更可能连接着其他行骗者.合法人更可能连接其他合法人. 令l为网络中合法结点 ...

  6. Network-based Fraud Detection for Social Security Fraud

    这个研究旨在确定那些故意申请破产来避免交税的公司.介绍了一个新的方法关于如何从一个时间加权网络中定义并提取出特征,如何利用整合在欺诈检测中基于网络的本质的特征. 欺诈检测是一个包括很多种类不同的申请者 ...

  7. Behavior Language Processing with Graph based Feature Generation for Fraud Detectionin OnlineLending

    节点的度描述了与这个信息节点相连的申请节点的个数,也遵循幂律.以公司为例的话就是大规模的公司例如顶尖保险公司和主要的物流公司通常与大量的贷款申请相关联. 全局欺诈传播的传播算法是度相关的,有大的度的节 ...

  8. 【总结】反欺诈(Fraud Detection)中所用到的机器学习模型

    反欺诈(Fraud Detection)是指识别和预防欺诈行为的过程,通常是通过监视和分析数据来识别异常行为和模式.机器学习在反欺诈中发挥了重要作用,可以使用各种机器学习算法来建立预测模型.下面列举了 ...

  9. 4.实操(Credit Card Fraud Detection)

    目录 一.数据挖掘流程 二.Data Preview 2.1 data. shape 2.2 data. head() 2.3 data.describe() 2.4 check NaN 2.5 Cl ...

最新文章

  1. 事务隔离机制原理分析以及是否可以防止订单超卖
  2. 51CTO博客2.0意见反馈处【2018版】
  3. 算法与数据结构(归并排序)
  4. is_numeric函数的引起的一个BUG说起
  5. 2020-07-07 CVPR2020 i3DV论文讨论(3) 笔记
  6. 如何通过使用注册项 (.reg) 文件添加、修改或删除注册表子项和值
  7. js遍历多层嵌套对象存在的JSO数据
  8. CodeForces - 224C. Bracket Sequence (栈模拟)简单做法
  9. inputdstream mysql_【sparkStreaming】将DStream保存在MySQL
  10. 诗与远方:无题(三十八)
  11. VVOL和VASA Provider
  12. [模板] tarjan/联通分量/dfs树
  13. 实战篇-六十六行完成简洁的Rss输出类
  14. unhandled exception in MSDEV.EXE(DEVSHL.DLL) :0xC0000005
  15. Kafka权威指南总结
  16. 实现国标GB/T28181流媒体服务解决方案EasyGBS之GB35114和GB28181的注册信令流程简介
  17. SI5341驱动(verilog)
  18. openxml sdk java_使用OpenXML SDK创建文档时,OpenXML Powertools HtmlConverter失败
  19. 解决office怎么卸载都卸载不干净的终极办法。
  20. 数模混合计算机应用,数模混合集成电路的发展现状和前景

热门文章

  1. VIC Classic 驱动程序
  2. GoLang各种库(转)
  3. 等待事件 latch:cache buffers chains
  4. Kubernetes实战(二十)-kubernetes二进制文件方式部署集群(非安全)(下)
  5. win2008 r2 配置程序office访问权限
  6. python:for循环和range()函数用法
  7. Java Socket:飞鸽传书的网络套接字
  8. 斗地主含赖子的牌型判断算法
  9. 史上最强Tomcat8性能优化
  10. 数据分析模型 第三章