Advertisement
Saleh127

CF 94A

Oct 23rd, 2020
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. #define ll long long
  4. #define test int t; cin>>t; for(int cs=1;cs<=t;cs++)
  5. int main()
  6. {
  7. ios_base::sync_with_stdio(0);
  8. cin.tie(0);
  9. cout.tie(0);
  10.  
  11. map<string,ll>x;
  12.  
  13. string a,b[100],c,d;
  14. ll e,f=0,i,j,k,l;
  15.  
  16. cin>>a;
  17.  
  18. for(i=0; i<10; i++)
  19. {
  20. cin>>b[i];
  21. }
  22.  
  23. for(k=0; k<=80; k+=10)
  24. {
  25. l=f*10+10;
  26. for(j=k; j<l; j++)
  27. {
  28. c+=a[j];
  29. }
  30. for(i=0; i<10; i++)
  31. {
  32. if(c==b[i])
  33. {
  34. cout<<i;
  35. }
  36. }
  37. f++;
  38. c.clear();
  39. }
  40.  
  41. /*
  42.  
  43. string a,c,d;
  44. ll i,j,k;
  45. cin>>c;
  46. for(i=0;i<10;i++)
  47. {
  48. cin>>a;
  49. x[a]=i;
  50. }
  51.  
  52. ///
  53.  
  54. for(i=0;i<c.size();i+=10)
  55. {
  56. d=c.substr(i,10);
  57. cout<<x[d];
  58. }
  59. */
  60. cout<<endl;
  61. return 0;
  62. }
  63.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement