225922026-01-15 11:43:44szasztundeBeszerzéscpp17Wrong answer 0/50605ms262144 KiB
#include <iostream>
#include <vector>

using namespace std;

int main()
{
    int n,m,k,hany,x,y;
    cin>>n>>m>>k;
    vector <vector<long long> > a(n+1,vector<long long>(k+2,0));
    for(int i=1;i<=n;i++)
    {
        cin>>hany;
        for(int j=1;j<=hany;j++)
        {
            cin>>x>>y;
            a[i][x]=y;
        }
    }
    for(int i=1;i<=m;i++)
    {
        cin>>hany;
        for(int j=1;j<=hany;j++)
        {
            cin>>x>>y;
            a[x][k+1]+=y;
        }
    }
    for(int i=1;i<=n;i++)
    {
        for(int j=1;j<=k+1;j++) cout<<a[i][j]<<" ";
        cout<<endl;
    }
    for(int j=1;j<=k;j++)
    {
        long long ossz=0;
        for(int i=1;i<=n;i++) ossz=ossz+a[i][j]*a[i][k+1];
        cout<<ossz<<" ";
    }
    return 0;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Wrong answer1ms316 KiB
subtask20/7
2Wrong answer56ms2612 KiB
3Wrong answer54ms2612 KiB
4Wrong answer54ms2612 KiB
5Wrong answer54ms2612 KiB
6Wrong answer56ms2808 KiB
subtask30/12
7Wrong answer1ms508 KiB
8Wrong answer2ms316 KiB
9Wrong answer2ms316 KiB
10Wrong answer2ms316 KiB
11Wrong answer1ms316 KiB
12Wrong answer4ms564 KiB
13Wrong answer3ms316 KiB
14Wrong answer7ms808 KiB
15Wrong answer6ms768 KiB
16Wrong answer3ms332 KiB
17Wrong answer9ms1076 KiB
subtask40/13
18Wrong answer56ms2612 KiB
19Wrong answer54ms2612 KiB
20Wrong answer54ms2612 KiB
21Wrong answer54ms2612 KiB
22Wrong answer56ms2808 KiB
23Wrong answer54ms2660 KiB
24Wrong answer56ms2612 KiB
25Wrong answer56ms2696 KiB
26Wrong answer56ms2756 KiB
27Wrong answer57ms2748 KiB
28Wrong answer61ms2848 KiB
29Wrong answer59ms2864 KiB
30Wrong answer57ms2752 KiB
31Wrong answer61ms2848 KiB
32Wrong answer64ms2848 KiB
33Wrong answer67ms2804 KiB
34Wrong answer61ms2748 KiB
35Wrong answer56ms2612 KiB
36Wrong answer61ms2860 KiB
subtask50/18
37Wrong answer1ms508 KiB
38Wrong answer56ms2612 KiB
39Wrong answer54ms2612 KiB
40Wrong answer54ms2612 KiB
41Wrong answer54ms2612 KiB
42Wrong answer56ms2808 KiB
43Wrong answer2ms316 KiB
44Wrong answer2ms316 KiB
45Wrong answer2ms316 KiB
46Wrong answer1ms316 KiB
47Wrong answer4ms564 KiB
48Wrong answer3ms316 KiB
49Wrong answer7ms808 KiB
50Wrong answer6ms768 KiB
51Wrong answer3ms332 KiB
52Wrong answer9ms1076 KiB
53Wrong answer54ms2660 KiB
54Wrong answer56ms2612 KiB
55Wrong answer56ms2696 KiB
56Wrong answer56ms2756 KiB
57Wrong answer57ms2748 KiB
58Wrong answer61ms2848 KiB
59Wrong answer59ms2864 KiB
60Wrong answer57ms2752 KiB
61Wrong answer61ms2848 KiB
62Wrong answer64ms2848 KiB
63Wrong answer67ms2804 KiB
64Wrong answer61ms2748 KiB
65Wrong answer56ms2612 KiB
66Wrong answer61ms2860 KiB
67Wrong answer109ms5620 KiB
68Wrong answer86ms3592 KiB
69Wrong answer96ms4640 KiB
70Wrong answer101ms5668 KiB
71Wrong answer112ms6436 KiB
72Time limit exceeded605ms71972 KiB
73Runtime error201ms262144 KiB
74Runtime error202ms262144 KiB
75Runtime error245ms262144 KiB
76Runtime error243ms262144 KiB
77Runtime error203ms262144 KiB
78Runtime error204ms262144 KiB