Submission #1841692
Source Code Expand
#include <iomanip> #include <random> #include <time.h> #include <vector> #include <queue> #include <functional> #include <map> #include <string> #include <cstdlib> #include <typeinfo> #include <math.h> #include <algorithm> #include <iostream> using namespace std; typedef long long ll; typedef pair<ll, ll> P; int main() { ll h, w, n, ans[110][110] = {}, x, y, a; cin >> h >> w >> n; for (int i = 0; i < n; i++) { cin >> x >> y >> a; if (a == 1) { for (int i = 0; i < 110; i++) { for (int j = 0; j < x; j++) { ans[i][j] = 1; } } } if (a == 2) { for (int i = 0; i < 110; i++) { for (int j = x; j < 110; j++) { ans[i][j] = 1; } } } if (a == 3) { for (int i = 0; i < y; i++) { for (int j = 0; j < 110; j++) { ans[i][j] = 1; } } } if (a == 4) { for (int i = y; i < 110; i++) { for (int j = 0; j < 110; j++) { ans[i][j] = 1; } } } } ll yojo = 0; for (int i = 0; i < h; i++) { for (int j = 0; j < w; j++) { if (!ans[i][j])yojo++; } } cout << yojo << endl; return 0; }
Submission Info
Submission Time | |
---|---|
Task | B - Snuke's Coloring 2 (ABC Edit) |
User | littlegirl112 |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 1133 Byte |
Status | WA |
Exec Time | 2 ms |
Memory | 384 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 | AC | 2 ms | 384 KB |
dir_02.txt | AC | 2 ms | 384 KB |
random_01.txt | AC | 2 ms | 384 KB |
random_02.txt | AC | 1 ms | 384 KB |
random_03.txt | AC | 2 ms | 384 KB |
random_04.txt | AC | 2 ms | 384 KB |
sample_01.txt | WA | 1 ms | 384 KB |
sample_02.txt | AC | 1 ms | 384 KB |
sample_03.txt | AC | 1 ms | 384 KB |
small_01.txt | AC | 1 ms | 384 KB |
small_02.txt | AC | 1 ms | 384 KB |
small_03.txt | AC | 1 ms | 384 KB |
small_04.txt | AC | 1 ms | 384 KB |