#include<bits/stdc++.h>#pragmaGCC optimize(2)usingnamespace std;//#define int long longtypedeflonglong LL;typedeflonglong ll;constint INF =0x3f3f3f3f;//const int inf = 1e18;constint mod =998244353;//const int mod = 1e9 + 7;intgcd(int a,int b){return!b ? a :gcd(b, a % b);}constint maxn =1e2+10;constint N =6e6+100;int dp[maxn][maxn];voidsolve(){int n,a,b;
cin>>n>>a>>b;for(int i =0; i < n*a;++i){for(int j =0; j < n*b;++j){
cout<<(i/a+j/b &1?'#':'.');}
cout<<endl;}}signedmain(){//ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);int _ =1;// cin >> _;while(_--){solve();//cout<<"\n";}return0;}//12341//14321//
C - Adjacent Swaps
#include<bits/stdc++.h>#pragmaGCC optimize(2)usingnamespace std;//#define int long longtypedeflonglong LL;typedeflonglong ll;constint INF =0x3f3f3f3f;//const int inf = 1e18;constint mod =998244353;//const int mod = 1e9 + 7;intgcd(int a,int b){return!b ? a :gcd(b, a % b);}constint maxn =1e6+10;constint N =6e6+100;int a[maxn],b[maxn];voidsolve(){int n,q;
cin>>n>>q;for(int i =0; i <=n;++i){
a[i]=b[i]=i;}while(q--){int x;
cin>>x;int opt=a[x];if(opt==n) opt=n-1;swap(b[opt],b[opt+1]);swap(a[b[opt]],a[b[opt+1]]);}for(int i =1; i <=n;++i){
cout<<b[i]<<" ";}}signedmain(){//ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);int _ =1;// cin >> _;while(_--){solve();//cout<<"\n";}return0;}//12341//14321//