Submission #34726310


Source Code Expand

    #include <bits/stdc++.h>

    #include <ext/pb_ds/assoc_container.hpp>
    #include <ext/pb_ds/tree_policy.hpp>
    // #pragma GCC target("popcnt")

using namespace std;
using namespace __gnu_pbds;

    template <typename t>
using ordered_set = tree<t, null_type, less<t>, rb_tree_tag, tree_order_statistics_node_update>;

    // #pragma gcc optimize("ofast")
    // #pragma gcc target("avx,avx2,fma")


    #define int long long

    #define all(x) (x).begin(), (x).end()


    #define pb push_back
    #define endl '\n'
    #define fi first
    #define se second

    // const int mod = 1e9 + 7;

const int mod=998'244'353;


const long long INF = 2e18 + 10;
    // const int INF=1e9+10;

    #define readv(x, n)   \
vector<int> x(n); \
for (auto &i : x) \
    cin >> i;



    template <typename t>
using v = vector<t>;

    template <typename t>
using vv = vector<vector<t>>;

    template <typename t>
using vvv = vector<vector<vector<t>>>;

typedef vector<int> vi;
typedef vector<double> vd;
typedef vector<vector<int>> vvi;
typedef vector<vector<vector<int>>> vvvi;
typedef vector<vector<vector<vector<int>>>> vvvvi;
typedef vector<vector<double>> vvd;

typedef pair<int, int> pii;



int multiply(int a, int b, int in_mod) { return (int)(1ll * a * b % in_mod); }
int mult_identity(int a) { return 1; }



const double pi = acosl(-1);



auto power(auto a, auto b, const int in_mod)
{

    auto prod = mult_identity(a);
    auto mult = a % in_mod;
    while (b != 0)
    {
        if (b % 2)
        {
            prod = multiply(prod, mult, in_mod);
        }
        if(b/2)
            mult = multiply(mult, mult, in_mod);
        b /= 2;
    }
    return prod;
}
auto mod_inv(auto q, const int in_mod)
{
    return power(q, in_mod - 2, in_mod);
}


mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());



    #define stp cout << fixed << setprecision(20);

void solv()
{
    int a, b, c, d, e;
    cin>>a>>b>>c>>d>>e; 

    set<int> ff;
    ff.insert(a);
    ff.insert(b);
    ff.insert(c);
    ff.insert(d);
    ff.insert(e);

    cout<<ff.size()<<endl;
}

void solve()    
{

    int t = 1;
        // cin>>t;
    while(t--)
    {
        solv();
    }
}




signed main()
{



    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cerr.tie(NULL);

    auto clk = clock();
        // -------------------------------------Code starts here---------------------------------------------------------------------

    signed t = 1;
        // cin >> t;

    for (signed test = 1; test <= t; test++)
    {
            // cout<<"Case #"<<test<<": ";

        solve();
    }

        // -------------------------------------Code ends here------------------------------------------------------------------

    clk = clock() - clk;

        #ifndef ONLINE_JUDGE
    cerr << fixed << setprecision(6) << "\nTime: " << ((float)clk) / CLOCKS_PER_SEC << "\n";
        #endif
    return 0;
}

Submission Info

Submission Time
Task A - Five Integers
User Wernier
Language C++ (GCC 9.2.1)
Score 100
Code Size 3075 Byte
Status AC
Exec Time 7 ms
Memory 3644 KiB

Compile Error

./Main.cpp: In function ‘long long int mult_identity(long long int)’:
./Main.cpp:63:23: warning: unused parameter ‘a’ [-Wunused-parameter]
   63 | int mult_identity(int a) { return 1; }
      |                       ^
./Main.cpp: At global scope:
./Main.cpp:71:12: warning: use of ‘auto’ in parameter declaration only available with ‘-fconcepts’
   71 | auto power(auto a, auto b, const int in_mod)
      |            ^~~~
./Main.cpp:71:20: warning: use of ‘auto’ in parameter declaration only available with ‘-fconcepts’
   71 | auto power(auto a, auto b, const int in_mod)
      |                    ^~~~
./Main.cpp:88:14: warning: use of ‘auto’ in parameter declaration only available with ‘-fconcepts’
   88 | auto mod_inv(auto q, const int in_mod)
      |              ^~~~

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 2
AC × 10
Set Name Test Cases
Sample example0.txt, example1.txt
All 000.txt, 001.txt, 002.txt, 003.txt, 004.txt, 005.txt, 006.txt, 007.txt, example0.txt, example1.txt
Case Name Status Exec Time Memory
000.txt AC 7 ms 3556 KiB
001.txt AC 2 ms 3572 KiB
002.txt AC 2 ms 3540 KiB
003.txt AC 3 ms 3636 KiB
004.txt AC 3 ms 3644 KiB
005.txt AC 2 ms 3500 KiB
006.txt AC 2 ms 3568 KiB
007.txt AC 2 ms 3560 KiB
example0.txt AC 2 ms 3600 KiB
example1.txt AC 2 ms 3632 KiB