Submission #41970751
Source Code Expand
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main() {
int W, H, N;
cin >> W >> H >> N;
vector<pair<int, int>> strawberries(N);
for (int i = 0; i < N; i++) {
int p, q;
cin >> p >> q;
strawberries[i] = make_pair(p, q);
}
int A;
cin >> A;
vector<int> a(A);
for (int i = 0; i < A; i++) {
cin >> a[i];
}
int B;
cin >> B;
vector<int> b(B);
for (int i = 0; i < B; i++) {
cin >> b[i];
}
vector<int> counts;
for (int i = 0; i <= A; i++) {
for (int j = 0; j <= B; j++) {
int count = 0;
for (int k = 0; k < N; k++) {
int x = strawberries[k].first;
int y = strawberries[k].second;
if (0 < x && x < a[i] && 0 < y && y < b[j]) {
count++;
}
}
counts.push_back(count);
}
}
int m = *min_element(counts.begin(), counts.end());
int M = *max_element(counts.begin(), counts.end());
cout << m << " " << M << endl;
return 0;
}
Submission Info
| Submission Time | |
|---|---|
| Task | D - A Piece of Cake |
| User | chacoder |
| Language | C++ (GCC 9.2.1) |
| Score | 0 |
| Code Size | 1179 Byte |
| Status | WA |
| Exec Time | 3308 ms |
| Memory | 6756 KiB |
Judge Result
| Set Name | Sample | All | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 0 / 400 | ||||||||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | example0.txt, example1.txt |
| All | 000.txt, 001.txt, 002.txt, 003.txt, 004.txt, 005.txt, 006.txt, 007.txt, 008.txt, 009.txt, 010.txt, 011.txt, 012.txt, 013.txt, 014.txt, 015.txt, 016.txt, 017.txt, 018.txt, 019.txt, 020.txt, 021.txt, 022.txt, 023.txt, 024.txt, 025.txt, 026.txt, 027.txt, 028.txt, 029.txt, 030.txt, 031.txt, 032.txt, 033.txt, 034.txt, 035.txt, 036.txt, 037.txt, 038.txt, 039.txt, 040.txt, 041.txt, 042.txt, example0.txt, example1.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 000.txt | AC | 108 ms | 4716 KiB |
| 001.txt | WA | 109 ms | 4588 KiB |
| 002.txt | WA | 102 ms | 4668 KiB |
| 003.txt | WA | 116 ms | 4736 KiB |
| 004.txt | WA | 116 ms | 4820 KiB |
| 005.txt | TLE | 3308 ms | 4964 KiB |
| 006.txt | TLE | 3308 ms | 5264 KiB |
| 007.txt | TLE | 3308 ms | 5340 KiB |
| 008.txt | TLE | 3308 ms | 6684 KiB |
| 009.txt | TLE | 3308 ms | 6504 KiB |
| 010.txt | TLE | 3308 ms | 6500 KiB |
| 011.txt | TLE | 3308 ms | 6496 KiB |
| 012.txt | TLE | 3308 ms | 6548 KiB |
| 013.txt | TLE | 3308 ms | 6700 KiB |
| 014.txt | TLE | 3308 ms | 6640 KiB |
| 015.txt | TLE | 3308 ms | 6420 KiB |
| 016.txt | TLE | 3308 ms | 6380 KiB |
| 017.txt | TLE | 3308 ms | 6508 KiB |
| 018.txt | TLE | 3308 ms | 6748 KiB |
| 019.txt | TLE | 3308 ms | 6688 KiB |
| 020.txt | TLE | 3308 ms | 6660 KiB |
| 021.txt | TLE | 3308 ms | 4920 KiB |
| 022.txt | TLE | 3308 ms | 5136 KiB |
| 023.txt | TLE | 3308 ms | 5380 KiB |
| 024.txt | TLE | 3308 ms | 5668 KiB |
| 025.txt | TLE | 3308 ms | 5696 KiB |
| 026.txt | TLE | 3308 ms | 6756 KiB |
| 027.txt | TLE | 3308 ms | 6584 KiB |
| 028.txt | TLE | 3308 ms | 6576 KiB |
| 029.txt | TLE | 3308 ms | 6584 KiB |
| 030.txt | TLE | 3308 ms | 6756 KiB |
| 031.txt | TLE | 3308 ms | 4840 KiB |
| 032.txt | WA | 2791 ms | 4764 KiB |
| 033.txt | WA | 851 ms | 4756 KiB |
| 034.txt | WA | 200 ms | 4656 KiB |
| 035.txt | WA | 143 ms | 4816 KiB |
| 036.txt | WA | 135 ms | 4756 KiB |
| 037.txt | WA | 118 ms | 4732 KiB |
| 038.txt | WA | 174 ms | 4732 KiB |
| 039.txt | WA | 126 ms | 4732 KiB |
| 040.txt | WA | 127 ms | 4816 KiB |
| 041.txt | WA | 116 ms | 4664 KiB |
| 042.txt | WA | 118 ms | 4652 KiB |
| example0.txt | AC | 2 ms | 3572 KiB |
| example1.txt | WA | 2 ms | 3460 KiB |