Submission #41024121


Source Code Expand

Copy
#include <iostream>
#include <vector>
#include <map>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int N, A, B; cin >> N >> A >> B;
map<int, int> C;
for(int i = 1; i <= N; i ++){
int c; cin >> c; C[c] = i;
}
cout << C[A + B] << '\n';
return 0;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#include <iostream>
#include <vector>
#include <map>

using namespace std;


int main() {

    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

    int N, A, B; cin >> N >> A >> B;

    map<int, int> C;
    for(int i = 1; i <= N; i ++){
        int c; cin >> c; C[c] = i;
    }
    cout << C[A + B] << '\n';

    return 0;
}

Submission Info

Submission Time
Task A - N-choice question
User liuyubobobo
Language C++ (Clang 10.0.0)
Score 100
Code Size 352 Byte
Status AC
Exec Time 9 ms
Memory 3188 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 3
AC × 14
Set Name Test Cases
Sample sample_01.txt, sample_02.txt, sample_03.txt
All sample_01.txt, sample_02.txt, sample_03.txt, test_01.txt, test_02.txt, test_03.txt, test_04.txt, test_05.txt, test_06.txt, test_07.txt, test_08.txt, test_09.txt, test_10.txt, test_11.txt
Case Name Status Exec Time Memory
sample_01.txt AC 9 ms 3120 KB
sample_02.txt AC 2 ms 3188 KB
sample_03.txt AC 2 ms 3132 KB
test_01.txt AC 2 ms 3184 KB
test_02.txt AC 2 ms 3092 KB
test_03.txt AC 2 ms 3012 KB
test_04.txt AC 2 ms 3004 KB
test_05.txt AC 2 ms 3080 KB
test_06.txt AC 2 ms 3012 KB
test_07.txt AC 5 ms 3112 KB
test_08.txt AC 2 ms 3108 KB
test_09.txt AC 2 ms 3148 KB
test_10.txt AC 2 ms 3116 KB
test_11.txt AC 2 ms 3028 KB


2025-02-28 (Fri)
05:18:26 +00:00