ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#205828 | #3697. 寄包柜 | Soulmate | 100 | 831ms | 9048kb | C++11 | 510b | 2024-07-19 19:49:22 | 2024-07-19 20:24:16 |
answer
#include <bits/stdc++.h>
using namespace std;
#define int long long
signed main()
{
int n,q;
cin>>n>>q;
map<int,int> a[100005];
while (q--)
{
int t,i,j,k;
cin>>t;
if (t==1)
{
cin>>i>>j>>k;
a[i][j]=k;
}
else if (t==2)
{
cin>>i>>j;
cout<<a[i][j]<<endl;
}
}
return 0;
}
详细
小提示:点击横条可展开更详细的信息
Test #1:
score: 10
Accepted
time: 0ms
memory: 5924kb
input:
5 25 1 1 1 9 2 1 1 1 2 1 8 2 2 1 1 2 2 22 2 2 2 1 3 1 17 2 3 1 1 3 5 25 2 3 5 1 4 1 8 2 4 1 1 4 4 4 ...
output:
9 8 22 17 25 8 4 13 17
result:
ok 9 lines
Test #2:
score: 10
Accepted
time: 2ms
memory: 5924kb
input:
8 40 1 1 1 26 2 1 1 1 1 7 19 2 1 7 1 2 1 3 2 2 1 1 2 7 20 2 2 7 1 3 1 8 2 3 1 1 3 5 26 2 3 5 1 4 1 8...
output:
26 19 3 20 8 26 8 9 29 22 20 19 21 13 25
result:
ok 15 lines
Test #3:
score: 10
Accepted
time: 2ms
memory: 5928kb
input:
48 287 1 1 1 112 2 1 1 1 2 222 479 2 2 222 1 3 176 670 2 3 176 1 4 4 284 2 4 4 1 5 234 629 2 5 234 1...
output:
112 479 670 284 629 35 1004 1056 1182 1286 818 94 694 992 575 1065 1138 1384 427 890 836 418 354 109...
result:
ok 140 lines
Test #4:
score: 10
Accepted
time: 0ms
memory: 5924kb
input:
35 265 1 1 64 306 2 1 64 1 2 22 84 2 2 22 1 3 93 71 2 3 93 1 4 6 889 2 4 6 1 5 171 1287 2 5 171 1 6 ...
output:
306 84 71 889 1287 905 554 143 1317 758 245 901 982 836 1196 564 1124 1278 573 65 297 827 331 232 63...
result:
ok 128 lines
Test #5:
score: 10
Accepted
time: 16ms
memory: 6068kb
input:
2069 13246 1 1 1 491811704 2 1 1 1 2 1 820353522 2 2 1 1 3 1 113503763 2 3 1 1 4 1 839952310 2 4 1 1...
output:
491811704 820353522 113503763 839952310 250489408 866937826 500199222 245364833 787675685 614784879 ...
result:
ok 5611 lines
Test #6:
score: 10
Accepted
time: 55ms
memory: 6196kb
input:
4045 35698 1 1 1 989944810 2 1 1 1 2 1 67244076 2 2 1 1 3 1 852042287 2 3 1 1 4 1 406935203 2 4 1 1 ...
output:
989944810 67244076 852042287 406935203 673355925 330503638 988691416 828193385 748011399 192870460 1...
result:
ok 14875 lines
Test #7:
score: 10
Accepted
time: 164ms
memory: 9044kb
input:
49992 100000 1 49992 213019 369305581 1 49992 82913 937610985 1 49992 54458 243994912 1 49992 375500...
output:
369305581 937610985 243994912 293316445 526395482 404578557 55782589 871896098 924291035 900281570 1...
result:
ok 50000 lines
Test #8:
score: 10
Accepted
time: 196ms
memory: 9048kb
input:
44470 100000 1 44470 41063 154544609 1 44470 153489 4533790 1 44470 444972 330968014 1 44470 232548 ...
output:
154544609 4533790 330968014 627408682 243493091 502401986 742644106 273963138 228210647 767087485 31...
result:
ok 50000 lines
Test #9:
score: 10
Accepted
time: 202ms
memory: 8480kb
input:
100000 100000 1 99981 100000 317972331 2 99981 100000 1 99982 100000 484860197 2 99982 100000 1 9998...
output:
317972331 484860197 142600903 48294341 527525517 373829569 398643004 146545031 66593841 661093147 32...
result:
ok 47279 lines
Test #10:
score: 10
Accepted
time: 194ms
memory: 8484kb
input:
100000 100000 1 99981 100000 865100719 2 99981 100000 1 99982 100000 688647524 2 99982 100000 1 9998...
output:
865100719 688647524 786854382 249220004 46491000 398396755 365455410 15901827 902178040 461808588 79...
result:
ok 47256 lines