Submission #1573892


Source Code Expand

#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define pb push_back
#define mp make_pair
ll a[501][501];
int main(){

int h,w,h1,w1;
cin>>h>>w>>h1>>w1;
if(((h1==h)&&(w1==w))||((h1==1)&&(w1==1)))
    cout<<"No"<<end;
else{

    cout<<"Yes"<<endl;

int inx=1;
int indy=1;
ll x=5;
ll y=h1*w1*5-1;
y=-y;
int i,j;
for(i=1;i<=h;i++)
for(j=1;j<=w;j++){

    if((i%h1==0)&&(j%w1==0))
        a[i][j]=y;
    else
        a[i][j]=x;



}


    for(i=1;i<=h;i++){

        for(j=1;j<=w;j++)
            cout<<a[i][j]<<" ";

        cout<<endl;
    }


}


return 0;
}


Submission Info

Submission Time
Task C - +/- Rectangle
User adam1007
Language C++14 (GCC 5.4.1)
Score 0
Code Size 633 Byte
Status CE

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:12:15: error: no match for ‘operator<<’ (operand types are ‘std::basic_ostream<char>’ and ‘<unresolved overloaded function type>’)
     cout<<"No"<<end;
               ^
In file included from /usr/include/c++/5/istream:39:0,
                 from /usr/include/c++/5/sstream:38,
                 from /usr/include/c++/5/complex:45,
                 from /usr/include/c++/5/ccomplex:38,
                 from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:52,
                 from ./Main.cpp:1:
/usr/include/c++/5/ostream:108:7: note: candidate: std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_ostream<_CharT, _Traits>::__ostream_type& (*)(std::basic_ostream<_CharT, _Traits>::__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]
       operator<<(__ostream_type& (*__pf)(__ostream_type&))
       ^
/usr/incl...