Saleh127

CF 1384A

Jul 24th, 2020
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. #define test int t; cin>>t; while (t--)
  4. #define ll long long int
  5. #define fellow_junior ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
  6. int main()
  7. {
  8. fellow_junior
  9.  
  10. test
  11. {
  12. ll c,d[200000],e,f,i,j,l;
  13. string a="";
  14. cin>>c;
  15. for(i=1;i<=c;i++)
  16. {
  17. cin>>d[i];
  18. }
  19. for(i=1;i<=100;i++)
  20. {
  21. a+="a";
  22. }
  23. cout<<a<<endl;
  24. for(i=1;i<=c;i++)
  25. {
  26. if(a[d[i]]=='a')
  27. {
  28. a[d[i]]='c';
  29. }
  30. else
  31. {
  32. a[d[i]]='a';
  33. }
  34. cout<<a<<endl;
  35. }
  36. }
  37. return 0;
  38. }
  39.  
Advertisement
Add Comment
Please, Sign In to add comment