Submission #34924268


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;
    cin>>a>>b>>c>>d;

    cout<< (a + b) * (c - d)<<endl;
    cout<<"Takahashi"<<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;
}

/*
000100

1000100

1 0 -1 -2 -1 -2 -3
*/

Submission Info

Submission Time
Task A - Anyway Takahashi
User Wernier
Language C++ (GCC 9.2.1)
Score 100
Code Size 2951 Byte
Status AC
Exec Time 5 ms
Memory 3656 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 × 3
AC × 10
Set Name Test Cases
Sample 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt
All 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 01_random_00.txt, 01_random_01.txt, 01_random_02.txt, 01_random_03.txt, 01_random_04.txt, 02_zero_00.txt, 02_zero_01.txt
Case Name Status Exec Time Memory
00_sample_00.txt AC 5 ms 3572 KiB
00_sample_01.txt AC 2 ms 3592 KiB
00_sample_02.txt AC 2 ms 3528 KiB
01_random_00.txt AC 2 ms 3532 KiB
01_random_01.txt AC 2 ms 3496 KiB
01_random_02.txt AC 2 ms 3656 KiB
01_random_03.txt AC 2 ms 3532 KiB
01_random_04.txt AC 2 ms 3592 KiB
02_zero_00.txt AC 2 ms 3548 KiB
02_zero_01.txt AC 2 ms 3604 KiB