Submission #00017


ソースコード

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#include<algorithm>
#include<iostream>
#include<math.h>
#include<stdio.h>
#include<vector>
#include<limits.h>
#include<string>
#include<cstdlib>
#include<queue>
#include<iterator>
#include<deque>
#include<set>
#include<unordered_set>
#include<map>
#include<stack>
#define mset multiset
#define unset unordered_set
#define ll long long
#define endl "\n";
#define prg_queue priority_queue <int,vector<int>,greater<int>
#define pr_queue priority_queue <int>
#define vector vector <int>
#define upper upper_bound
#define lower lower_bound
using namespace std;
int main(){
ll a,b=0,c=0,d=0,e=0,x=0,y=0,z=0;
map <pair<int,int>,int> q;
cin >>a;
for (int o=0; o<a; o++){
cin >>b;
if(b==1){
cin >>x>>y>>z;
q[{x,y}]=z;
}
if(b==2){
cin >>x>>y>>z;
cout <<q[{x,y}]<<endl
}
}
return 0;
}

ステータス

項目 データ
問題 0004 - 配列
ユーザー名 SnakyZoo8277089
投稿日時 2024-07-08 16:50:28
言語 C++17
状態 Accepted
得点 15
ソースコード長 926 Byte
最大実行時間 225 ms
最大メモリ使用量 7420 KB

セット

セット 得点 Cases
1 ALL 15 / 15 *

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
in1.txt AC 20 ms 476 KB
1
in2.txt AC 20 ms 572 KB
1
in3.txt AC 22 ms 420 KB
1
in4.txt AC 179 ms 1416 KB
1
in5.txt AC 186 ms 1524 KB
1
in6.txt AC 225 ms 7264 KB
1
in7.txt AC 214 ms 7420 KB
1