Josif_tepe

Untitled

Mar 14th, 2026
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.87 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. int main(){
  4.     int n,x,y,c;
  5.     cin >>n>>x>>y>>c;
  6.     int a,b;
  7. //    for(int i=0;i<n;i++){
  8. //        for(int j=0;j<n;j++){
  9. //            
  10. //            if((i+j)%2==0){
  11. //                a=0;
  12. //            }
  13. //            
  14. //            else{
  15. //                a=1;
  16. //            }
  17. //            cout << a;
  18. //            if(i==x and j==y){
  19. //                if(a==c){
  20. //                    a=1;
  21. //                }
  22. //                
  23. //                else a=0;
  24. //            }
  25. //            
  26. //        }
  27. //        cout << endl;
  28. //    }
  29.    
  30.     for(int i=0;i<n;i++){
  31.         for(int j=0;j<n;j++){
  32.             if(j<=n-1-i){
  33.                 b=1;
  34.             }
  35.             else{
  36.                 b=0;
  37.             }
  38.             cout << b ;
  39.         }
  40.         cout << endl;
  41.     }
  42.    
  43.    
  44.     return 0;
  45. }
  46.  
Advertisement
Add Comment
Please, Sign In to add comment