48402023-03-31 19:00:03EyusieFőzet készítéscpp17Wrong answer 0/5075ms4288 KiB
#include <bits/stdc++.h>

using namespace std;
int n, k, m, i, j;
set<float> arany;
vector<int> ertekek;
int counter;
int main()
{
    iostream::sync_with_stdio(0);
    cin.tie();

    cin >> n;
    counter = 0;


    for(int f = 0; f < n; f++)
    {
        cin >> k >> m;
        for(i = 1; i <= k; i++)
        {
            for(j = 1; j <= m; j++)
            {
                if(arany.find(i/j) == arany.end())
                {
                counter++;
                k-=i;
                m-=j;
                arany.insert(i/j);
                }
            }
        }
        ertekek.push_back(counter);
        arany.clear();
        counter = 0;
    }
    for(auto itr = ertekek.begin(); itr != ertekek.end(); ++itr)
    {
        cout << *itr << "\n";
    }
}
SubtaskSumTestVerdictTimeMemory
base0/50
1Accepted0/03ms1888 KiB
2Wrong answer0/08ms2272 KiB
3Wrong answer0/33ms2336 KiB
4Wrong answer0/23ms2508 KiB
5Wrong answer0/33ms2736 KiB
6Wrong answer0/23ms2932 KiB
7Wrong answer0/38ms3316 KiB
8Wrong answer0/28ms3248 KiB
9Wrong answer0/38ms3396 KiB
10Wrong answer0/28ms3344 KiB
11Wrong answer0/272ms3256 KiB
12Wrong answer0/274ms3480 KiB
13Wrong answer0/275ms3356 KiB
14Wrong answer0/274ms3508 KiB
15Wrong answer0/274ms3432 KiB
16Wrong answer0/271ms3428 KiB
17Wrong answer0/275ms3680 KiB
18Wrong answer0/271ms3784 KiB
19Wrong answer0/274ms4044 KiB
20Wrong answer0/371ms4136 KiB
21Wrong answer0/372ms4232 KiB
22Wrong answer0/375ms4212 KiB
23Wrong answer0/375ms4288 KiB