Submission #1772750
Source Code Expand
#include <bits/stdc++.h> using namespace std; int main() { int H, W, h, w; cin >> H >> W >> h >> w; int nrlin = H / h; int nrcol = W / w; if (H % h == 0 && W % w == 0) cout << "No\n"; return 0; } else cout << "Yes\n"; for (int i(1); i <= H; i++) for (int j(1); j <= W; j++) cout << (i % h == 0 && j % w == 0 ? -h * w * 1000 - 1 : 1000) << " \n"[j == W]; return 0; }
Submission Info
Submission Time | |
---|---|
Task | C - +/- Rectangle |
User | teomrn |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 473 Byte |
Status | CE |
Compile Error
./Main.cpp:16:5: error: expected unqualified-id before ‘else’ else ^ ./Main.cpp:19:5: error: expected unqualified-id before ‘for’ for (int i(1); i <= H; i++) ^ ./Main.cpp:19:20: error: ‘i’ does not name a type for (int i(1); i <= H; i++) ^ ./Main.cpp:19:28: error: ‘i’ does not name a type for (int i(1); i <= H; i++) ^ ./Main.cpp:20:24: error: ‘j’ does not name a type for (int j(1); j <= W; j++) ^ ./Main.cpp:20:32: error: ‘j’ does not name a type for (int j(1); j <= W; j++) ^ ./Main.cpp:22:5: error: expected unqualified-id before ‘return’ return 0; ^ ./Main.cpp:23:1: error: expected declaration before ‘}’ token } ^