Submission #1707896
Source Code Expand
#include <bits/stdc++.h> using namespace std; #define DEBUG(x) cerr << #x << ": " << x << endl; #define ll long long int main() { int w, h, n; cin >> w >> h >> n; bool cood[109][109]; for (int i = 0; i < 109; i++) { for (int j = 0; j < 109; j++) { cood[i][j] = false; } } cout << endl; for (int i = 0; i < n; i++) { int x, y, a; cin >> x >> y >> a; if (a == 1) { cout << "------------------- 1 ------------------------" << endl; for (int j = 0; j < h; j++) { for (int k = 0; k < x; k++) { printf("(x, y) = (%d, %d)\n", k+1, j+1); cood[j][k] = true; } } } else if (a == 2) { cout << "------------------- 2 ------------------------" << endl; for (int j = 0; j < h; j++) { for (int k = x; k < w; k++) { printf("(x, y) = (%d, %d)\n", k+1, j+1); cood[j][k] = true; } } } else if (a == 3) { cout << "------------------- 3 ------------------------" << endl; for (int j = 0; j < y; j++) { for (int k = 0; k < w; k++) { printf("(x, y) = (%d, %d)\n", k+1, j+1); cood[j][k] = true; } } } else if (a == 4) { cout << "------------------- 4 ------------------------" << endl; for (int j = y; j < h; j++) { for (int k = 0; k < w; k++) { printf("(x, y) = (%d, %d)\n", k+1, j+1); cood[j][k] = true; } } } } int cnt = 0; for (int i = 0; i < h; i++) { for (int j = 0; j < w; j++) { if (cood[i][j]) cnt++; } } cout << h*w - cnt << endl; return 0; }
Submission Info
Submission Time | |
---|---|
Task | B - Snuke's Coloring 2 (ABC Edit) |
User | nomi |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 2009 Byte |
Status | WA |
Exec Time | 83 ms |
Memory | 9856 KB |
Judge Result
Set Name | sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 200 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
sample | sample_01.txt, sample_02.txt, sample_03.txt |
All | dir_01.txt, dir_02.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, sample_01.txt, sample_02.txt, sample_03.txt, small_01.txt, small_02.txt, small_03.txt, small_04.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
dir_01.txt | WA | 77 ms | 8960 KB |
dir_02.txt | WA | 76 ms | 9088 KB |
random_01.txt | WA | 83 ms | 9856 KB |
random_02.txt | WA | 34 ms | 3968 KB |
random_03.txt | WA | 50 ms | 5888 KB |
random_04.txt | WA | 37 ms | 4352 KB |
sample_01.txt | WA | 1 ms | 256 KB |
sample_02.txt | WA | 1 ms | 256 KB |
sample_03.txt | WA | 1 ms | 256 KB |
small_01.txt | WA | 1 ms | 256 KB |
small_02.txt | WA | 1 ms | 256 KB |
small_03.txt | WA | 1 ms | 256 KB |
small_04.txt | WA | 3 ms | 384 KB |