45702023-03-30 08:22:29EyusieDinamitcpp17Wrong answer 5/503ms3816 KiB
#include <iostream>
#include <bits/stdc++.h>

using namespace std;

int main()
{
        int sor, oszlop, din;
        cin >> sor >> oszlop >> din;
        vector<vector<int>> asd(sor, vector<int>(oszlop));
        for(int i = 0; i < sor; i++)
        {
            for(int j = 0; j < oszlop; j++)
            {
                cin >> asd[i][j];
            }
        }
        vector<int> s;
        int x = sor-1;
        int y = oszlop-1;
        s.push_back(asd[x][y]);
        while(x != 0 || y != 0)
        {
            if(y == 0) x--;
            else if(x == 0) y--;
            else if(log(asd[x][y-1]) > log(asd[x-1][y])) x--;
            else y--;
            s.push_back(asd[x][y]);
        }
        sort(s.begin(), s.end(), greater<>());
        while(din > 0)
        {
            s[0] = floor(s[0]/2);
            sort(s.begin(),s.end(), greater<>());
            din--;
        }
        int szam = 0;
        for(int i = 0; i < s.size(); i++)
        {

            szam+=s[i];
        }
        cout << szam;

}
SubtaskSumTestVerdictTimeMemory
base5/50
1Accepted0/03ms1808 KiB
2Wrong answer0/03ms2068 KiB
3Wrong answer0/23ms2100 KiB
4Wrong answer0/23ms2376 KiB
5Wrong answer0/33ms2392 KiB
6Wrong answer0/33ms2456 KiB
7Accepted2/23ms2692 KiB
8Accepted3/33ms2928 KiB
9Wrong answer0/22ms3008 KiB
10Wrong answer0/22ms3116 KiB
11Wrong answer0/33ms3292 KiB
12Wrong answer0/32ms3272 KiB
13Wrong answer0/23ms3404 KiB
14Wrong answer0/33ms3536 KiB
15Wrong answer0/23ms3520 KiB
16Wrong answer0/33ms3416 KiB
17Wrong answer0/23ms3544 KiB
18Wrong answer0/33ms3652 KiB
19Wrong answer0/23ms3692 KiB
20Wrong answer0/33ms3692 KiB
21Wrong answer0/23ms3688 KiB
22Wrong answer0/33ms3816 KiB