# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
98518 |
2019-02-23T20:17:57 Z |
pamaj |
Zoltan (COCI16_zoltan) |
C++14 |
|
640 ms |
23668 KB |
#include <bits/stdc++.h>
using namespace std;
#define int int64_t
const int mod = 1e9 + 7;
int v[200010];
int n;
map<int, int> mp;
set<int> st;
int exp(int x, int y, int p)
{
int res = 1;
x = x % p;
while (y > 0)
{
if (y & 1)
res = (res*x) % p;
y = y>>1;
x = (x*x) % p;
}
return res;
}
int32_t main()
{
cin >> n;
for(int i = 0; i < n; i++)
{
cin >> v[i];
mp[v[i]]++;
st.insert(v[i]);
}
long long ans = 1;
for(auto u : st)
{
ans *= exp(2, mp[u], mod);
ans %= mod;
}
cout << st.size() << " " << ans << "\n";
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
256 KB |
Output isn't correct |
2 |
Incorrect |
2 ms |
256 KB |
Output isn't correct |
3 |
Incorrect |
3 ms |
384 KB |
Output isn't correct |
4 |
Incorrect |
2 ms |
384 KB |
Output isn't correct |
5 |
Incorrect |
2 ms |
256 KB |
Output isn't correct |
6 |
Incorrect |
2 ms |
256 KB |
Output isn't correct |
7 |
Incorrect |
4 ms |
384 KB |
Output isn't correct |
8 |
Incorrect |
3 ms |
384 KB |
Output isn't correct |
9 |
Incorrect |
3 ms |
256 KB |
Output isn't correct |
10 |
Incorrect |
3 ms |
384 KB |
Output isn't correct |
11 |
Incorrect |
334 ms |
18860 KB |
Output isn't correct |
12 |
Incorrect |
278 ms |
16688 KB |
Output isn't correct |
13 |
Incorrect |
235 ms |
15452 KB |
Output isn't correct |
14 |
Incorrect |
405 ms |
16516 KB |
Output isn't correct |
15 |
Incorrect |
511 ms |
20472 KB |
Output isn't correct |
16 |
Incorrect |
640 ms |
23668 KB |
Output isn't correct |
17 |
Incorrect |
290 ms |
20216 KB |
Output isn't correct |
18 |
Incorrect |
315 ms |
20372 KB |
Output isn't correct |
19 |
Incorrect |
289 ms |
20312 KB |
Output isn't correct |
20 |
Incorrect |
314 ms |
20220 KB |
Output isn't correct |