Codeforces Round #425 (Div. 2), problem: (B) Petya and Exam Solution In C/C++

By | 2017-07-25T01:14:34+00:00 July 25th, 2017|Categories: C/C++, Programming, Uncategorized|Tags: , , , , , , , |

#include<iostream> #include<cstdio> #include<cstring> using namespace std; string s,t; int q; string str; int w; bool g[26]; int main() { cin>>s; for(int i=0;i<s.size();i++) { g[s[i]-'a']=true; } cin>>t; int lt=t.size(); int s=0; w=-1; for(int i=0;i<lt;i++) { if(t[i]=='*')w=i;else s++; } scanf("%d",&q); while(q--) { cin>>str; int l=str.size(); if(l<s [...]