Submission #76280637
Source Code Expand
#include <bits/stdc++.h>
using namespace std;
int main() {
int N,M;
cin >> N >> M;
vector<int> A(N);
vector<int> B(M);
for(int i=0;i<N;i++){
cin >> A.at(i);
}
for(int i=0;i<M;i++){
cin >> B.at(i);
}
int count =0;
for(int i=0;i<N;i++){
long long x = A.at(i);
int s = -1;
for(int j=0;j<M;j++){
long long y = B.at(j);
if(x*2 >= y){
count ++;
B.at(j) = 0;
s++;
}
}
if(s > 0){
count -=s;
}
}
cout << count << endl;
}
Submission Info
| Submission Time | |
|---|---|
| Task | C - Sushi |
| User | naka0713 |
| Language | C++23 (GCC 15.2.0) |
| Score | 0 |
| Code Size | 651 Byte |
| Status | WA |
| Exec Time | > 2000 ms |
| Memory | 5012 KiB |
Judge Result
| Set Name | Sample | All | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 0 / 300 | ||||||||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | sample00.txt, sample01.txt, sample02.txt |
| All | sample00.txt, sample01.txt, sample02.txt, testcase00.txt, testcase01.txt, testcase02.txt, testcase03.txt, testcase04.txt, testcase05.txt, testcase06.txt, testcase07.txt, testcase08.txt, testcase09.txt, testcase10.txt, testcase11.txt, testcase12.txt, testcase13.txt, testcase14.txt, testcase15.txt, testcase16.txt, testcase17.txt, testcase18.txt, testcase19.txt, testcase20.txt, testcase21.txt, testcase22.txt, testcase23.txt, testcase24.txt, testcase25.txt, testcase26.txt, testcase27.txt, testcase28.txt, testcase29.txt, testcase30.txt, testcase31.txt, testcase32.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| sample00.txt | WA | 1 ms | 3472 KiB |
| sample01.txt | AC | 1 ms | 3552 KiB |
| sample02.txt | WA | 1 ms | 3484 KiB |
| testcase00.txt | AC | 635 ms | 3740 KiB |
| testcase01.txt | WA | 12 ms | 3600 KiB |
| testcase02.txt | WA | 687 ms | 3688 KiB |
| testcase03.txt | WA | 303 ms | 3792 KiB |
| testcase04.txt | AC | 67 ms | 3612 KiB |
| testcase05.txt | WA | 686 ms | 3604 KiB |
| testcase06.txt | WA | 178 ms | 3664 KiB |
| testcase07.txt | TLE | > 2000 ms | 4416 KiB |
| testcase08.txt | TLE | > 2000 ms | 4908 KiB |
| testcase09.txt | TLE | > 2000 ms | 4828 KiB |
| testcase10.txt | TLE | > 2000 ms | 4372 KiB |
| testcase11.txt | TLE | > 2000 ms | 4268 KiB |
| testcase12.txt | TLE | > 2000 ms | 4336 KiB |
| testcase13.txt | TLE | > 2000 ms | 4828 KiB |
| testcase14.txt | TLE | > 2000 ms | 4720 KiB |
| testcase15.txt | TLE | > 2000 ms | 4772 KiB |
| testcase16.txt | AC | 41 ms | 3544 KiB |
| testcase17.txt | AC | 361 ms | 3732 KiB |
| testcase18.txt | TLE | > 2000 ms | 4884 KiB |
| testcase19.txt | TLE | > 2000 ms | 4848 KiB |
| testcase20.txt | TLE | > 2000 ms | 4828 KiB |
| testcase21.txt | TLE | > 2000 ms | 4844 KiB |
| testcase22.txt | AC | 1 ms | 3472 KiB |
| testcase23.txt | AC | 1 ms | 3516 KiB |
| testcase24.txt | TLE | > 2000 ms | 4848 KiB |
| testcase25.txt | TLE | > 2000 ms | 4712 KiB |
| testcase26.txt | TLE | > 2000 ms | 4704 KiB |
| testcase27.txt | TLE | > 2000 ms | 4724 KiB |
| testcase28.txt | TLE | > 2000 ms | 5012 KiB |
| testcase29.txt | TLE | > 2000 ms | 4780 KiB |
| testcase30.txt | TLE | > 2000 ms | 4816 KiB |
| testcase31.txt | TLE | > 2000 ms | 4848 KiB |
| testcase32.txt | TLE | > 2000 ms | 4772 KiB |