74922024-01-09 10:38:22almadavKártyajátékcpp17Wrong answer 10/30465ms5468 KiB
#include <bits/stdc++.h>

using namespace std;

int main()
{
    iostream::sync_with_stdio(0);
    cin.tie(0);
    int n,k;
    int pont =0;
    cin >> n;
    cin >> k;
    bool nem;
    vector<unsigned long long> alma;
    unsigned long long current;
    for(int i =0; i<k;i++)
    {
        cin >> current; alma.push_back(current);
    }
    for(int i =0; i<k;i++)
    {
        nem = true;
        current = alma[i];
        if(current == n+1) continue;
        for(int j = i ; j < k; j++)
        {
            //cout << "almaj:" << alma[j] << " current:" << current<<endl;
            if(alma[j] < current)
            {
                if(nem)pont++;
                alma[j] = n+1;
                nem = false;
            }
        }
    }
    cout << pont;
}
SubtaskSumTestVerdictTimeMemory
base10/30
1Accepted0/03ms1828 KiB
2Wrong answer0/03ms2064 KiB
3Accepted1/12ms2236 KiB
4Accepted1/13ms2324 KiB
5Accepted1/13ms2560 KiB
6Accepted2/23ms2936 KiB
7Accepted2/23ms2980 KiB
8Accepted2/23ms3244 KiB
9Accepted1/1164ms5468 KiB
10Time limit exceeded0/2455ms4112 KiB
11Time limit exceeded0/3465ms4112 KiB
12Time limit exceeded0/3453ms4272 KiB
13Wrong answer0/12ms3728 KiB
14Wrong answer0/22ms3712 KiB
15Wrong answer0/32ms3712 KiB
16Wrong answer0/33ms3832 KiB
17Wrong answer0/32ms4068 KiB