fork download
  1. #include<bits/stdc++.h>
  2. #define int long long
  3. using namespace std;
  4. int a[18][18]={},i,j;
  5. void generate_square(int i)
  6. {
  7. for(j=i;j<=16-i;j++) a[i][j]=1;
  8. for(j=i;j<=16-i;j++) a[16-i][j]=1;
  9. for(j=i;j<=16-i;j++) a[j][i]=1;
  10. for(j=i;j<=16-i;j++) a[j][16-i]=1;
  11. }
  12. signed main()
  13. {
  14. ios_base::sync_with_stdio(0);
  15. cin.tie(0); cout.tie(0);
  16. for(i=1;i<=7;i+=2) generate_square(i);
  17. int x,y;
  18. cin>>x>>y;
  19. if (a[x][y]==1) cout<<"den";
  20. else cout<<"trang";
  21. return 0;
  22. }
Success #stdin #stdout 0s 5304KB
stdin
3 5
stdout
den