Submission #3819530
Source Code Expand
#include<iostream> #include<algorithm> #include<vector> typedef long long lint; using namespace std; int main() { lint N; vector<lint> A,B,C; lint a,c; lint ans=0; cin >> N; A.resize(N); B.resize(N); C.resize(N); for(lint i=0;i<N;i++) cin >> A[i]; for(lint i=0;i<N;i++) cin >> B[i]; for(lint i=0;i<N;i++) cin >> C[i]; sort(A.begin(),A.end()); sort(B.begin(),B.end()); sort(C.begin(),C.end()); for(lint i=0;i<N;i++) { a=lower_bound(A.begin(),A.end(),B[i])-A.begin(); c=C.end()-lower_bound(C.begin(),C.end(),B[i]+1); ans+=a*c; cout << a << "*" << c << "=" << a*c << endl; } cout << ans << endl; return 0; }
Submission Info
Submission Time | |
---|---|
Task | C - Snuke Festival |
User | silopy |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 683 Byte |
Status | WA |
Exec Time | 319 ms |
Memory | 5120 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 300 | ||||
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, 11.txt, 12.txt, 13.txt, 14.txt, 15.txt, 16.txt, 17.txt, 18.txt, 19.txt, 20.txt, 21.txt, 22.txt, 23.txt, 24.txt, 25.txt, 26.txt, 27.txt, 28.txt, 29.txt, s1.txt, s2.txt, s3.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
01.txt | WA | 317 ms | 4736 KB |
02.txt | WA | 319 ms | 4736 KB |
03.txt | WA | 293 ms | 4736 KB |
04.txt | WA | 296 ms | 4736 KB |
05.txt | WA | 262 ms | 4736 KB |
06.txt | WA | 257 ms | 4736 KB |
07.txt | WA | 247 ms | 4736 KB |
08.txt | WA | 247 ms | 4736 KB |
09.txt | WA | 248 ms | 4608 KB |
10.txt | WA | 235 ms | 4608 KB |
11.txt | WA | 227 ms | 3584 KB |
12.txt | WA | 230 ms | 3584 KB |
13.txt | WA | 316 ms | 4864 KB |
14.txt | WA | 315 ms | 3584 KB |
15.txt | WA | 316 ms | 3712 KB |
16.txt | WA | 313 ms | 3584 KB |
17.txt | WA | 315 ms | 3584 KB |
18.txt | WA | 310 ms | 3200 KB |
19.txt | WA | 319 ms | 4736 KB |
20.txt | WA | 230 ms | 5120 KB |
21.txt | WA | 225 ms | 3200 KB |
22.txt | WA | 309 ms | 3200 KB |
23.txt | WA | 315 ms | 4864 KB |
24.txt | WA | 315 ms | 4096 KB |
25.txt | WA | 313 ms | 4224 KB |
26.txt | WA | 1 ms | 256 KB |
27.txt | WA | 1 ms | 256 KB |
28.txt | WA | 1 ms | 256 KB |
29.txt | WA | 1 ms | 256 KB |
s1.txt | WA | 1 ms | 256 KB |
s2.txt | WA | 1 ms | 256 KB |
s3.txt | WA | 1 ms | 256 KB |