Submission #2817613
Source Code Expand
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main() {
int N; cin >> N;
vector<int> A(N), B(N), C(N);
for(int i = 0; i < N; i++) cin >> A[i];
for(int i = 0; i < N; i++) cin >> B[i];
for(int i = 0; i < N; i++) cin >> C[i];
sort(A.begin(), A.end());
sort(B.begin(), B.end());
sort(C.begin(), C.end());
int rst = 0;
for(auto i : B) {
cout << endl;
int a_b = lower_bound(A.begin(), A.end(), i) - A.begin();
// cout << i << " " << a_b << endl;
int b_c = C.end() - lower_bound(C.begin(), C.end(), i);
// cout << i << " " << b_c << endl;
rst += a_b * b_c;
// cout << endl;
}
cout << rst << endl;
}
Submission Info
| Submission Time | |
|---|---|
| Task | A - Rotation |
| User | Shiro_K |
| Language | C++14 (Clang 3.8.0) |
| Score | 0 |
| Code Size | 763 Byte |
| Status | WA |
| Exec Time | 7 ms |
| Memory | 888 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 0 / 100 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | s1.txt, s2.txt, s3.txt |
| All | 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, 10.txt, s1.txt, s2.txt, s3.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 01.txt | WA | 7 ms | 888 KiB |
| 02.txt | WA | 1 ms | 256 KiB |
| 03.txt | WA | 1 ms | 256 KiB |
| 04.txt | WA | 1 ms | 256 KiB |
| 05.txt | WA | 1 ms | 256 KiB |
| 06.txt | WA | 1 ms | 256 KiB |
| 07.txt | WA | 1 ms | 256 KiB |
| 08.txt | WA | 1 ms | 256 KiB |
| 09.txt | WA | 1 ms | 256 KiB |
| 10.txt | WA | 1 ms | 256 KiB |
| s1.txt | WA | 1 ms | 256 KiB |
| s2.txt | WA | 1 ms | 256 KiB |
| s3.txt | WA | 1 ms | 256 KiB |