Submission #57782880


Source Code Expand

Copy
//abc 371
#include <bits/stdc++.h>
using namespace std;
int main(){
int n;
cin>>n;
vector <int> a(n);
vector<int> b(n);
for(int i=0;i<n;i++){
cin>>a[i];
}
for(int i=0;i<n;i++){
cin>>b[a[i]];
}
int d;
cin>>d;
for(int i=0;i<d;i++){
int e,f;
cin>>e>>f;
int sum=0;
for(int j=e;j<=f;j++){
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
//abc 371
#include <bits/stdc++.h>
using namespace std;
int main(){
    int n;
    cin>>n;
    vector <int> a(n);
    vector<int> b(n);
    for(int i=0;i<n;i++){
        cin>>a[i];
    }
    for(int i=0;i<n;i++){
    cin>>b[a[i]];
    }
    int d;
    cin>>d;
    for(int i=0;i<d;i++){
        int e,f;
        cin>>e>>f;
        int sum=0;
        for(int j=e;j<=f;j++){
             
            sum += b[j];
            
        }
        cout<<sum<<endl;
        
    }
}

Submission Info

Submission Time
Task D - 1D Country
User jackofall
Language C++ 20 (gcc 12.2)
Score 0
Code Size 503 Byte
Status RE
Exec Time 127 ms
Memory 4932 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 350
Status
RE × 2
AC × 1
RE × 25
Set Name Test Cases
Sample 00_sample_01.txt, 00_sample_02.txt
All 00_sample_01.txt, 00_sample_02.txt, 01_test_01.txt, 01_test_02.txt, 01_test_03.txt, 01_test_04.txt, 01_test_05.txt, 01_test_06.txt, 01_test_07.txt, 01_test_08.txt, 01_test_09.txt, 01_test_10.txt, 01_test_11.txt, 01_test_12.txt, 01_test_13.txt, 01_test_14.txt, 01_test_15.txt, 01_test_16.txt, 01_test_17.txt, 01_test_18.txt, 01_test_19.txt, 01_test_20.txt, 01_test_21.txt, 01_test_22.txt, 01_test_23.txt, 01_test_24.txt
Case Name Status Exec Time Memory
00_sample_01.txt RE 76 ms 3360 KB
00_sample_02.txt RE 77 ms 3500 KB
01_test_01.txt RE 125 ms 4868 KB
01_test_02.txt RE 127 ms 4812 KB
01_test_03.txt RE 125 ms 4816 KB
01_test_04.txt RE 125 ms 4752 KB
01_test_05.txt RE 124 ms 4784 KB
01_test_06.txt RE 126 ms 4860 KB
01_test_07.txt RE 126 ms 4844 KB
01_test_08.txt RE 125 ms 4932 KB
01_test_09.txt RE 125 ms 4912 KB
01_test_10.txt RE 125 ms 4784 KB
01_test_11.txt RE 89 ms 3644 KB
01_test_12.txt RE 93 ms 3880 KB
01_test_13.txt RE 78 ms 3384 KB
01_test_14.txt RE 78 ms 3376 KB
01_test_15.txt RE 79 ms 3444 KB
01_test_16.txt RE 124 ms 4884 KB
01_test_17.txt RE 127 ms 4828 KB
01_test_18.txt RE 126 ms 4904 KB
01_test_19.txt RE 126 ms 4760 KB
01_test_20.txt RE 125 ms 4800 KB
01_test_21.txt RE 126 ms 4860 KB
01_test_22.txt RE 126 ms 4808 KB
01_test_23.txt RE 125 ms 4756 KB
01_test_24.txt AC 1 ms 3464 KB


2025-04-24 (Thu)
12:23:48 +00:00