| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1304367 | _Temirhan | Multiplication (BOI24_multiplication) | C++20 | 1 ms | 580 KiB |
#include <bits/stdc++.h>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;
#if defined(__GNUC__) || defined(__clang__)
#pragma GCC optimize("Ofast,unroll-loops,inline-functions,no-stack-protector")
#pragma GCC target("avx2,fma,tune=native")
#pragma clang loop vectorize(enable)
#pragma clang loop interleave(enable)
#endif
#define int long long
#define sz(x) (int)x.size()
#define F first
#define S second
#define pb push_back
#define nl '\n'
#define o_set tree<int, null_type, less_equal<int>, rb_tree_tag, tree_order_statistics_node_update>
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
typedef pair<int, int> pii;
void file( string s = "" )
{
if( s.empty() )
return;
freopen((s + ".in").c_str(), "r", stdin);
freopen((s + ".out").c_str(), "w", stdout);
}
const int N = 2e5 + 2;
const int N1 = 1e6 + 2;
const int inf = 1e9 + 2;
const int INF = 1e18 + 2;
const int mod = 1e9 + 7;
int T = 1;
void solve()
{
int n;
cin >>n;
int ans = 1;
for( int i = 1, x; i <= n; ++i )
{
cin >>x;
ans = ans * x % mod;
}
cout <<ans;
}
signed main()
{
file("");
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
// cin >>T;
while( T-- )
solve();
}
Compilation message (stderr)
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
